Migrate to built-in Kotlin - #5
Conversation
TomHa-Apadmi
commented
May 26, 2026
- Migrates plugin to use the version of Kotlin built-in to AGP.
- Adds support for AGP 9.X.
- Raises minimum Flutter SDK version to 3.44.0
- Bumps Android dependencies.
There was a problem hiding this comment.
Pull request overview
This PR updates the plugin and its example project to align with newer Flutter/Android toolchains by moving to AGP 9.x (and intended “built-in Kotlin”), updating Gradle/AGP versions, and raising the minimum supported Flutter SDK.
Changes:
- Raised minimum Flutter SDK to 3.44.0 and updated Dart SDK constraints.
- Upgraded Android build tooling (AGP 9.2.1, Gradle 9.5.1) and Java/Kotlin JVM target to 21.
- Updated Android dependencies and added a new changelog entry for the next release.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Raises Dart/Flutter environment constraints. |
| example/pubspec.yaml | Updates example’s Dart/Flutter environment constraints. |
| example/pubspec.lock | Regenerated lockfile to reflect updated SDK constraints and dependency resolution. |
| example/android/settings.gradle.kts | Upgrades AGP/Kotlin plugin management versions for the example build. |
| example/android/gradle/wrapper/gradle-wrapper.properties | Upgrades the example’s Gradle wrapper to 9.5.1. |
| example/android/gradle.properties | Adds Flutter migrator flags for the example build. |
| example/android/app/build.gradle.kts | Removes explicit Kotlin plugin and updates JVM targets to 21. |
| CHANGELOG.md | Adds a 1.1.0 changelog entry describing the migration. |
| android/settings.gradle | Migrates to pluginManagement-based setup and sets AGP version for the plugin build. |
| android/gradle/wrapper/gradle-wrapper.properties | Upgrades the plugin’s Gradle wrapper to 9.5.1. |
| android/gradle.properties | Adds AGP/Flutter migrator flags for the plugin Android build. |
| android/build.gradle | Removes explicit Kotlin/AGP classpath config, updates compileSdk/JVM targets, and bumps dependencies. |
| .fvmrc | Pins Flutter to 3.44.0 for local development via FVM. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| id("com.android.application") version "8.7.0" apply false | ||
| id("org.jetbrains.kotlin.android") version "1.8.22" apply false | ||
| id("com.android.application") version "9.2.1" apply false | ||
| id("org.jetbrains.kotlin.android") version "2.3.21" apply false |
| implementation("com.scottyab:rootbeer-lib:0.1.1") | ||
| testImplementation("org.jetbrains.kotlin:kotlin-test") | ||
| testImplementation("org.mockito:mockito-core:5.0.0") | ||
| implementation("com.scottyab:rootbeer-lib:0.1.2") |
There was a problem hiding this comment.
One for a future PR, but these should probably go into a versions.toml
There was a problem hiding this comment.
Ye, I think that requires migrating to a new DSL, which I'm minded to do, I just didn't want to compund this diff
|
Going to put this PR on hold for a bit. The line you commented on @patrickcapadmi was actually vetoing built-in Kotlin for the whole project so the build doesn't really work. |