-
Notifications
You must be signed in to change notification settings - Fork 271
Migrate to Kotlin DSL, Compose, and modern Android stack #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
codebutler
wants to merge
137
commits into
master
Choose a base branch
from
claude/update-android-dependencies-87n3T
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…P 9.0 Convert the entire build system from Groovy to Kotlin DSL. Add a Gradle version catalog (libs.versions.toml) for centralized dependency management. Update all dependencies to latest stable versions. Key version changes: - Kotlin: 2.3.0 - Android Gradle Plugin: 9.0.0 - Compose Multiplatform: 1.10.0 - kotlinx-serialization: 1.10.0 - kotlinx-coroutines: 1.10.2 - kotlinx-datetime: 0.7.1 - SQLDelight: 2.2.1 - Koin: 4.1.1 - Compile SDK: 35, Min SDK: 23
…restructure Migrate all core modules to Kotlin Multiplatform with commonMain/androidMain/iosMain source sets. Convert all remaining Java files to Kotlin. Absorb nfc-felica-lib submodule into farebot-card-felica. Major changes: - farebot-app renamed to farebot-android - Replace Hilt DI with Koin (cross-platform) - Replace Gson with kotlinx.serialization - Replace custom ByteArray wrapper with kotlin.ByteArray + extension functions - Remove Room, use SQLDelight for cross-platform persistence - Add MDST (Metrodroid Station Data Table) reader for protobuf station databases - Add NFC abstraction layer for KMP readiness (CardTransceiver, NfcTechnology) - Add StringResource abstraction for cross-platform string formatting - Add TransitCurrency, TransitBalance, Transaction, TransactionTrip abstractions - Add MDST station databases (38 files) for worldwide transit station lookups - Add 220+ tests across 29 test files
Ported from Metrodroid (https://github.com/metrodroid/metrodroid) to Kotlin Multiplatform. Co-Authored-By: Michael Farrell <micolous+git@gmail.com>
Ported from Metrodroid (https://github.com/metrodroid/metrodroid) to Kotlin Multiplatform. Co-Authored-By: Michael Farrell <micolous+git@gmail.com>
Ported from Metrodroid (https://github.com/metrodroid/metrodroid) to Kotlin Multiplatform. Co-Authored-By: Michael Farrell <micolous+git@gmail.com>
Ported from Metrodroid (https://github.com/metrodroid/metrodroid) to Kotlin Multiplatform. Co-Authored-By: Michael Farrell <micolous+git@gmail.com>
For transit systems where only the card serial number can be read, with a reason code (LOCKED, NOT_STORED, MORE_RESEARCH_NEEDED). Ported from Metrodroid (https://github.com/metrodroid/metrodroid) Co-Authored-By: Michael Farrell <micolous+git@gmail.com>
Shared framework for ERG-based transit systems (used by Australian and New Zealand systems like Opal, SmartRider, seq:go). Ported from Metrodroid (https://github.com/metrodroid/metrodroid) Co-Authored-By: Michael Farrell <micolous+git@gmail.com>
Shared framework for Cubic Nextfare-based transit systems. Ported from Metrodroid (https://github.com/metrodroid/metrodroid) Co-Authored-By: Michael Farrell <micolous+git@gmail.com>
Add a new CardsMapScreen accessible from the Help screen toolbar that displays all supported transit cards as markers on a world map using their GPS coordinates. Includes platform-specific map implementations for Android (Google Maps), iOS (MapKit), and a JVM placeholder. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite README.md with platform compatibility table, full supported cards list organized by region, architecture overview, and build instructions for the KMP project. Add TODO.md for tracking remaining work, TODO-flipper-dumps.md for Flipper NFC dump integration notes, and iosApp/RENAME-PLAN.md for the iOS project rename plan. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete the Android-specific TransitFactoryRegistry.kt that was superseded by the shared TransitFactoryRegistryBuilder. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keys are exclusively used for MIFARE Classic sector authentication — no other card type has key infrastructure in either FareBot or Metrodroid. Make onNavigateToKeys nullable and only show the menu item when MifareClassic is in the supported card types set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All settings toggles were dead code — values were saved but never read. The only functional usage (appSettings.region for sorting supported cards by proximity) is replaced with a simple expect/actual getDeviceRegion() function. This removes ~800 lines of dead code including SettingsScreen, SettingsViewModel, AppSettings (all platforms), RawLevel, and ~30 pref_* string resources. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ary null assertions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the splash-based home screen with a two-tab layout (Scan | Explore) and a floating action button for NFC scanning. Embed history and supported cards as tab content, add an inline map with search and region-based pan/zoom to the Explore tab, and connect the locked card error dialog to the Add Key screen with pre-filled card data. Remove unused standalone History, Help, and CardsMap screens. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Aligns the iOS module naming with the farebot-* convention used by all other modules (farebot-android, farebot-shared, etc.). - Rename iosApp/ → farebot-ios/, iosApp/iosApp/ → farebot-ios/FareBot/ - Rename iosApp.entitlements → FareBot.entitlements - Update project.yml target name, sources, and paths - Regenerate Xcode project via xcodegen - Update Makefile references - Update CLAUDE.md module listing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The persist module was tiny (2 interfaces, 2 implementations, 2 models, 2 SQL schemas) and only consumed by farebot-shared and farebot-android. Since farebot-shared already exported it via api(), the separate module added complexity without benefit. - Move all source files and SQLDelight schemas into farebot-shared - Add sqldelight plugin and driver dependencies to farebot-shared - Remove farebot-app-persist from settings.gradle.kts and build files - Package names unchanged (com.codebutler.farebot.persist) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tapping a card with a sample dump in the Explore tab now parses and displays its transit info (balance, trips, subscriptions) without saving to history. Includes 14 bundled dump files (Flipper .nfc, Metrodroid JSON, and binary .mfc) for Clipper, ORCA, Suica, PASMO, ICOCA, EasyCard, Opal, HSL, Troika, TMoney, EZLink, Mobib, and Holo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename modules to a consistent farebot-app* family: - farebot-shared → farebot-app (KMP app framework) - farebot-android → farebot-app-android (thin Android shell) - farebot-ios → farebot-app-ios (thin iOS shell) Move Android platform code (DI, NFC, scanner, platform actions) from farebot-app-android into farebot-app/androidMain, mirroring how iOS platform code lives in farebot-app/iosMain. The Android app module is now a thin shell with just Activities, manifest, and resources. Remove 60+ redundant farebot-card-*/farebot-transit-* dependencies from the Android app module since farebot-app exports them via api(). Update generated resource imports (farebot_shared → farebot_app), Makefile, Xcode project.yml, CLAUDE.md, and README.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Import from Clipboard, Share, and Save menu items are removed from the home screen. Share/Save remain available on the single card view. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…only on Scan tab Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dump TODO - Add Ventra.json sample (from metrodroid#855) and wire up in SupportedCardsData - Add MetrodroidDumpIntegrationTest with 3 tests: Ventra UL ($8.44 balance), Troika Classic E/3 (0 RUB), Troika Classic E/5 (50 RUB) - Update TODO-flipper-dumps.md with newly discovered GitHub dumps (Venezia UL, Andante Blue, Riga E-talons, Mexico City) and mark Ventra/Troika as done - Remove obsolete TODO.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the broken JSON-transformation approach in CardImporter with a proper MetrodroidJsonParser that directly constructs RawCard objects from Metrodroid JSON format. This fixes sample card loading on the Explore screen and enables integration tests for Metrodroid-format dump files. The parser handles DESFire, Ultralight, Classic, ISO7816 (with SFI extraction from FCI), and CEPAS compat format (with pre-parsed card wrapper for decoded fields). Integration tests cover: Opal, HSL v2, HSL Ultralight, Troika UL, T-Money, EZ-Link, Holo, and Mobib. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…onTest Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tegration test Add parseFelica() method to MetrodroidJsonParser supporting FeliCa card dumps with systems/services/blocks structure. Create Octopus sample dump from OctopusTransitTest data (system 0x8008, service 0x0117) with balance verification (-HKD 14.40). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reflect 21 cards now having both Explore samples and integration tests, including new additions: Compass, SEQ Go, LAX TAP, MSP GoTo, Myki, and Octopus. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…scan needs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, split keyless from keys-required Restructures the "dumps still needed" section into clear priority tiers: - Full implementations (keyless Classic, keys-required Classic, DESFire, FeliCa, etc.) - Serial-only and preview cards (low priority) - Suica-compatible variants and low-priority Calypso (lowest priority) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add two new toggle options to the Explore tab menu, matching the existing "Show unsupported cards" pattern. Serial-only cards and cards requiring key cracking are hidden by default since most users can't use them. Cards with built-in keys still show. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nner, translucent Explore top bar - Move card deletion from history list to card detail screen overflow menu - Add requiresActiveScan to CardScanner interface (Android=false, iOS=true) - Show NFC listening banner on Android scan tab instead of scan FAB - Make Explore tab top bar translucent so map extends behind it - Pass topPadding to PlatformCardsMap for proper map content insets - Only show NFC disabled banner on scan tab Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Lift search query state out of ExploreContent so parent can control it - Search Explore cards by location name in addition to card name - Track current region by viewport center instead of first visible item - Keep map visible during search, reduce map height - Rename Scan tab to Cards, add cards stack icon - Fix card detail info item layout: add spacer and weight for value text - Fix iOS file picker: use NSTimer delay for presentation, scene-based window API, dispatch result to next run loop after picker dismisses - Remove unused material-icons-extended Android dependency - Remove simulator framework build from iOS Makefile target Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is a major modernization of the FareBot build system and Android codebase. The project has been migrated from Groovy-based Gradle to Kotlin DSL, updated to use Jetpack Compose for UI, and upgraded all dependencies to current versions. The build now uses Koin for dependency injection instead of Dagger, and Kotlinx Serialization instead of Gson.
Key Changes
Build System & Dependencies
build.gradle→build.gradle.kts(Kotlin DSL)dependencies.gradleand inlined dependency managementDependency Injection
AndroidModule.ktwith all Android-specific bindingsFareBotApplicationto use Koin'sstartKoin()DaggerFareBotApplicationComponentSerialization
KotlinxCardKeysSerializerfor card key serializationInstantinstead ofjava.util.DateUI & Platform
AndroidPlatformActionsfor platform-specific operations (clipboard, file picker, NFC settings, etc.)StringResourceabstraction instead of AndroidContextNfcStreamto use Kotlin Flow for reactive tag eventsManifest & Configuration
android:exported="true"to activities (required for API 31+)farebot-android/build.gradle.ktswith modern Android DSLDocumentation
CLAUDE.mdwith proxy configuration guide for authenticated HTTP proxy environmentsCleanup
.gitmodules(nfc-felica-lib submodule).kotlinto.gitignoreNotable Implementation Details
CLAUDE.mddocuments a sophisticated local proxy setup for environments behind authenticated HTTP proxies, with health checks and credential rotation supporthttps://claude.ai/code/session_016GBryRuV3PUzuQhuW2gArG