From f0f9ed8c345ef5502c38615ac6278c292078b875 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 14 Aug 2026 20:28:12 -0500 Subject: [PATCH] Verify builds on both platforms; pin Android SDK levels compileSdk 37 (a dependency requires it; the build fails on 36), minSdk 26 for parity with the native app, targetSdk 36. AGP auto-installed platform 37, CMake and a 2.8GB NDK during the build since licences were already accepted. Both artifacts confirmed: Runner.app and app-debug.apk. Recorded two deprecation warnings against flutter_foreground_task, the plugin chosen for Android background liveness in T12: no Swift Package Manager support on iOS, and it applies KGP on Android. Both are future hard errors, so the LocationSource seam in T10 matters more than assumed. Also recorded the disk episode: the plan braced for SDK installs, but builds were what filled the disk (22 GiB to 3.9 GiB). Recovered to 11 GiB. Co-Authored-By: Claude Opus 5 --- .gitignore | 4 +++ android/app/build.gradle.kts | 6 ++--- docs/port/PROGRESS.md | 52 ++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 79f7eca..3aad8c4 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,7 @@ app.*.map.json # Widget Preview related .widget_preview/ + +# Build artifacts (large; regenerable) +build/ +.dart_tool/ diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 92c2bdd..ae44eb3 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -6,7 +6,7 @@ plugins { android { namespace = "com.rippr" - compileSdk = flutter.compileSdkVersion + compileSdk = 37 ndkVersion = flutter.ndkVersion compileOptions { @@ -19,8 +19,8 @@ android { applicationId = "com.rippr.port" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion + minSdk = 26 // parity with the native app (Android 8.0) + targetSdk = 36 // Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION // is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions) // You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true` diff --git a/docs/port/PROGRESS.md b/docs/port/PROGRESS.md index 90d0cea..7253857 100644 --- a/docs/port/PROGRESS.md +++ b/docs/port/PROGRESS.md @@ -57,6 +57,58 @@ validation in T25: record the same ride on both simultaneously and compare the n The Android `namespace` stays `com.rippr` and the Kotlin source was moved from `kotlin/com/rippr/rippr/` to `kotlin/com/rippr/` to match. +### Builds verified on both platforms + +`✓ build/ios/iphonesimulator/Runner.app` and `✓ build/app/outputs/flutter-apk/app-debug.apk`. + +Android needed three changes to the generated `build.gradle.kts`: + +```kotlin +compileSdk = 37 // a dependency demands it; the build fails outright on 36 +minSdk = 26 // parity with the native app (Android 8.0) +targetSdk = 36 +``` + +`sdkmanager` cannot fetch `platforms;android-37` from the stable channel — it reports +"Failed to find package". **AGP installed it automatically** during the build (as +`android-37.0`), along with CMake 3.22.1 and a 2.8 GB NDK, because the licences had +already been accepted. Convenient, but see the disk note below. + +### ⚠ `flutter_foreground_task` is on two deprecation paths + +Both warnings name the same package — the one chosen for Android background liveness in +T12: + +- **iOS:** does not support Swift Package Manager. *"This will become an error in a future + version of Flutter."* +- **Android:** applies the Kotlin Gradle Plugin. *"Future versions of Flutter will fail to + build if your app uses plugins that apply KGP."* + +Neither breaks today's build. Both should be re-checked at T12, and they strengthen the +case for the `LocationSource` seam in T10 — the background layer needs to stay swappable. + +### The disk problem was real, just not where the plan predicted + +The plan braced for SDK *installs* filling the disk. The actual consumption was **builds**: +free space fell from 22 GiB to **3.9 GiB** during the first Android build — Gradle caches +grew 3.7 → 8.0 GB, the NDK added 2.8 GB, and `build/` alone reached 2.7 GB. + +Recovery, in order of how safe each step was: + +| Action | Reclaimed | +|---|---| +| Delete `build/` + `flutter clean` + the native app's `app/build` | ~3.8 GiB | +| Prune Gradle caches for versions **no project uses** (9.5.0, 9.7.0), `build-cache-1`, and the native project's 8.11.1 distribution | ~3 GiB | + +Ended at **11 GiB free (94% used)**. `modules-2` (1.9 GB) was deliberately **kept** — +deleting it forces a re-download of every dependency, which is a real time cost for space +we do not currently need. Only two Gradle versions are actually in use: 9.3.1 (this +project) and 8.11.1 (the native app, whose distribution cache re-downloads on demand). + +**Standing risk for T24:** the Android emulator needs a fixed 7.4 GiB free to boot. At 11 +GiB that works, but one more full build cycle could eat the margin. Run `flutter clean` +before booting the emulator. + ### Dependencies `flutter_riverpod` · `go_router` · `drift` + `drift_flutter` · `path_provider` ·