Support AGP 9 built-in Kotlin#121
Open
nohli wants to merge 11 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the plugin’s Android build configuration to be compatible with Android Gradle Plugin (AGP) 9+ and Flutter’s “built-in Kotlin” mode, addressing #119 by avoiding plugin-owned AGP/Kotlin classpaths and only applying the Kotlin Gradle plugin when needed.
Changes:
- Remove plugin-owned
buildscriptclasspaths for AGP/Kotlin and conditionally applykotlin-androidbased on AGP major version andandroid.builtInKotlin. - Migrate JVM target configuration from
kotlinOptionsto the newerkotlin { compilerOptions { ... } }DSL (plugin + example app). - Update example project tooling to AGP 9.1.1 / newer Gradle wrapper, and bump package version + changelog/docs.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
android/build.gradle |
Removes plugin-owned AGP/Kotlin classpaths; conditionally applies Kotlin plugin and updates Kotlin compiler/JVM target config for AGP 9 compatibility. |
example/android/app/build.gradle |
Removes explicit Kotlin Android plugin application and configures Kotlin JVM target via kotlin { compilerOptions }. |
example/android/settings.gradle |
Updates example to AGP 9.1.1 and removes explicit Kotlin plugin management entry. |
example/android/gradle/wrapper/gradle-wrapper.properties |
Updates Gradle wrapper version used by the example Android project. |
example/android/gradle.properties |
Adds android.newDsl=false to example project properties. |
pubspec.yaml |
Bumps package version to 0.5.2. |
example/pubspec.lock |
Updates resolved dependency versions / SDK metadata for the example app. |
README.md |
Documents AGP 9 / built-in Kotlin compatibility and the rationale for the build changes. |
CHANGELOG.md |
Adds 0.5.2 release notes describing the AGP 9 / Kotlin compatibility work. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #119