chore: migrate Android example to AGP 9#392
Conversation
|
Fixed the release Kotlin target mismatch in 79fdc59 by configuring all KotlinCompile tasks to use JVM 1.8 for both the AGP 9 example app and the plugin's AGP 7/8 path. Also added the missing example ProGuard rules file required by AGP 9 release minification. Verified :app:assembleRelease now passes. |
|
Pushed f94acba to explicitly keep built-in Kotlin enabled for the migrated example app. Flutter 3.44's migrator otherwise appends android.builtInKotlin=false, which opts the example back out of the migration. I verified release assembly with built-in Kotlin enabled, including with a stale ignored GeneratedPluginRegistrant.java present locally. |
|
Fixed the Flutter APK lookup failure in 8f7acfb. The Gradle 9 layout.buildDirectory migration was resolving to example/android/build instead of example/build; changed it to ../../build so Flutter finds build/app/outputs/flutter-apk/app-release.apk again. Verified with cd example && flutter build apk --release. |
Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>
💡 Motivation and Context
Migrate the Android example app to AGP 9.2.1 and Gradle 9.4.1, while aligning the example Android project structure with the latest Flutter Android template.
Fixes #390.
💚 How did you test it?
cd example/android && ./gradlew help --no-daemon --console=plaincd example/android && ./gradlew :app:compileDebugKotlin --no-daemon --console=plaincd example/android && ./gradlew :app:assembleRelease --no-daemon --console=plaincd example/android && ./gradlew build --dry-run --no-daemon --console=plaincd example && flutter build apk --releaseposthog_flutter/androidGradle configuration with AGP 8.11.1 using Gradle 8.14 and an injected FluttercompileSdkVersionproperty📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file