Skip to content

Migrate example app to built-in Kotlin and AGP 9 - #99

Merged
felnanuke2 merged 2 commits into
masterfrom
example-builtin-kotlin
Oct 7, 2026
Merged

felnanuke2 merged 2 commits into
masterfrom
example-builtin-kotlin

Conversation

@felnanuke2

Copy link
Copy Markdown
Owner

Follow-up to #98 (plugin migration). Migrates the example app to Flutter built-in Kotlin, per the app-developers migration guide.

Changes

  • example/android/settings.gradle: AGP 8.13.2 → 9.1.0; removed org.jetbrains.kotlin.android plugin declaration
  • example/android/build.gradle (root): removed the buildscript block (KGP classpath + AGP classpath; AGP now comes from the settings plugins block)
  • example/android/app/build.gradle: removed kotlin-android and kotlin-stdlib-jdk7; kotlinOptions → top-level kotlin { compilerOptions { jvmTarget = JVM_11 } }
  • example/android/gradle.properties: android.builtInKotlin=true; dropped android.enableJetifier flags (removed in AGP 9; the ignorelist was already opting its only entry out)
  • Gradle wrapper 8.13 → 9.3.1 (the pairing Flutter 3.47 templates ship)
  • CI: Flutter 3.44.2 → 3.47.4 — enabling built-in Kotlin requires Flutter 3.47+ and AGP 9+

Notes

  • Only the example + CI are affected; the plugin package itself is unchanged from Migrate Android plugin to built-in Kotlin (#94) #98.
  • coverage.yml / docs-pages.yml stay on 3.44.2 (they don't build the example's Android side).
  • Local validation isn't possible on 3.44 tooling; the build-android CI job (now on 3.47.4) is the validator.

- AGP 8.13.2 -> 9.1.0, Gradle wrapper 8.13 -> 9.3.1 (Flutter 3.47 template pairing)
- Remove kotlin-android, KGP classpath, kotlin-stdlib-jdk7 from the example
- kotlinOptions -> kotlin { compilerOptions { jvmTarget } } (top level)
- Enable android.builtInKotlin=true; drop removed jetifier flags
- Bump CI Flutter to 3.47.4 (built-in Kotlin requires 3.47+)
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Flutter 3.47 requires Kotlin >= 2.2.20; without a KGP declaration it
detects AGP 9.1.0's embedded Kotlin (2.2.10) and fails validation.
Matches the Flutter 3.47 app template.
@felnanuke2
felnanuke2 merged commit 6375396 into master Oct 7, 2026
4 checks passed
@felnanuke2
felnanuke2 deleted the example-builtin-kotlin branch October 7, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants