Skip to content

Support AGP 9 built-in Kotlin#121

Open
nohli wants to merge 11 commits into
mainfrom
fix/built-in-kotlin-agp9
Open

Support AGP 9 built-in Kotlin#121
nohli wants to merge 11 commits into
mainfrom
fix/built-in-kotlin-agp9

Conversation

@nohli

@nohli nohli commented Jul 3, 2026

Copy link
Copy Markdown
Member

Fixes #119

Copilot AI review requested due to automatic review settings July 3, 2026 01:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 buildscript classpaths for AGP/Kotlin and conditionally apply kotlin-android based on AGP major version and android.builtInKotlin.
  • Migrate JVM target configuration from kotlinOptions to the newer kotlin { 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.

@nohli nohli changed the title Fix/built in kotlin agp9 Support AGP 9 built-in Kotlin Jul 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

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.

[compat][android] android_id plugin incompatible with AGP 9.0+ — build fails (kotlin-android & proguard)

2 participants