Skip to content

Support AGP 9 example compatibility#122

Open
nohli wants to merge 1 commit into
mainfrom
update-agp9-example-compatibility
Open

Support AGP 9 example compatibility#122
nohli wants to merge 1 commit into
mainfrom
update-agp9-example-compatibility

Conversation

@nohli

@nohli nohli commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

  • declare Kotlin Gradle Plugin 2.2.20 for the example fallback path
  • apply Kotlin plugins only when the host does not use AGP 9 built-in Kotlin
  • keep plugin Gradle configuration compatible with older supported Flutter hosts
  • bump the package to 0.5.2+2

Validation

  • fresh consumer builds on every installed supported Flutter line from 3.10.6 through 3.44.6
  • integration tests on Android API 24, 31, 35, 36, and 37
  • AGP 9 legacy and built-in Kotlin paths
  • Flutter analysis and unit tests

Copilot AI review requested due to automatic review settings July 12, 2026 09:40

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

Updates the plugin’s Android/Gradle setup and the example app to remain compatible across Flutter hosts ranging from legacy AGP/Kotlin setups through AGP 9’s built-in Kotlin support, and bumps the package patch version accordingly.

Changes:

  • Bump package version to 0.5.2+2 (and update the example lockfile and changelog).
  • Example: declare Kotlin Gradle Plugin 2.2.20 and conditionally apply Kotlin based on AGP 9 built-in Kotlin behavior.
  • Plugin Android build: add Flutter-extension fallbacks for compileSdk/minSdk and adjust Kotlin JVM target configuration paths.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pubspec.yaml Bumps package version to 0.5.2+2.
example/pubspec.lock Updates example’s path dependency version to match the package bump.
example/android/settings.gradle Declares KGP 2.2.20 in plugin management for the example project.
example/android/app/build.gradle Adds AGP/built-in Kotlin detection and conditionally applies Kotlin/Flutter Gradle plugins.
android/build.gradle Adds flutter extension fallbacks and adjusts Kotlin JVM target configuration by Kotlin path.
CHANGELOG.md Documents the 0.5.2+2 changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1 to 3
plugins {
id "com.android.application"
// The Flutter Gradle Plugin must be applied after the Android Gradle plugin.
id "dev.flutter.flutter-gradle-plugin"
}
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