7a58483ba2
The project pinned Gradle 8.12 / AGP 8.9.1 / Kotlin 2.1.0, all three below the
hard error floors that Flutter 3.47.1 enforces in DependencyVersionChecker.kt
(8.14.0 / 8.11.1 / 2.2.20). Nothing here had rotted; the SDK moved.
Targets Flutter's own template defaults rather than the lowest combo that
clears the floors, because Flutter promotes its warn floor to the error floor
in the very next release -- clearing only the hard floor buys one release of
runway. `flutter-android-preflight` on the host re-derives all of this from
the installed SDK.
Also:
- kotlinOptions{} -> kotlin{compilerOptions{}}: the old DSL is a script
COMPILATION error under Kotlin >= 2.3, not a warning.
- Java/jvmTarget 11 -> 17, matching what the AndroidX artifacts now require.
- Drop android.enableJetifier (obsolete, removed outright in AGP 9); the
Flutter migrator adds builtInKotlin/newDsl=false in its place. Keep them:
builtInKotlin=true makes AGP 9.1.0 supply Kotlin 2.2.10, which is BELOW
Flutter's own 2.2.20 floor, so Flutter rejects its own recommendation.
- Force plugin subprojects to compileSdk 36 / minSdk 24. bg_launcher 0.1.0 is
abandoned at compileSdk 31 and the AndroidX artifacts it resolves to refuse
it. The override must be registered before evaluationDependsOn(":app"),
which evaluates subprojects eagerly. Dropping bg_launcher is the real fix.
Verified: flutter build apk --debug and --release, as both mikkeli and hermes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dKAqFo9Uj3mPZWvDzj3G8