Summary
Starting with Android Gradle Plugin (AGP) 9.0, support for applying the Kotlin Gradle Plugin (KGP) is removed. package_info_plus applies KGP directly in its Android build, so under AGP 9.0+ it causes a configuration error that prevents the host app from building. On AGP 8.x it currently only produces a warning, but Flutter 3.44 has only temporarily shimmed this support, and that shim is slated to be removed in a future Flutter release.
Where
In packages/package_info_plus/package_info_plus/android/build.gradle (latest published 10.1.0, and identical on main):
apply plugin: 'kotlin-android'
- buildscript
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" (Kotlin 2.2.0)
There is no Kotlin-DSL build.gradle.kts for this package, so no current version is AGP-9-ready.
Ask
Please migrate to Built-in Kotlin following Flutter's plugin-author guide:
https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
Concretely: stop applying kotlin-android and move the Kotlin compiler configuration into a top-level kotlin { compilerOptions { … } } block. The first-party flutter/packages plugins are a good reference for the target shape — e.g. shared_preferences_android 2.4.24 and webview_flutter_android 4.12.1 ("Migrates to Built-in Kotlin to support AGP 9").
Impact
This currently blocks downstream apps from upgrading to AGP 9 / Gradle 9, since a single KGP-applying plugin fails the whole build under AGP 9. Thanks for maintaining the plus_plugins suite! 🙏
Summary
Starting with Android Gradle Plugin (AGP) 9.0, support for applying the Kotlin Gradle Plugin (KGP) is removed.
package_info_plusapplies KGP directly in its Android build, so under AGP 9.0+ it causes a configuration error that prevents the host app from building. On AGP 8.x it currently only produces a warning, but Flutter 3.44 has only temporarily shimmed this support, and that shim is slated to be removed in a future Flutter release.Where
In
packages/package_info_plus/package_info_plus/android/build.gradle(latest published10.1.0, and identical onmain):apply plugin: 'kotlin-android'classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"(Kotlin2.2.0)There is no Kotlin-DSL
build.gradle.ktsfor this package, so no current version is AGP-9-ready.Ask
Please migrate to Built-in Kotlin following Flutter's plugin-author guide:
https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
Concretely: stop applying
kotlin-androidand move the Kotlin compiler configuration into a top-levelkotlin { compilerOptions { … } }block. The first-partyflutter/packagesplugins are a good reference for the target shape — e.g.shared_preferences_android2.4.24 andwebview_flutter_android4.12.1 ("Migrates to Built-in Kotlin to support AGP 9").Impact
This currently blocks downstream apps from upgrading to AGP 9 / Gradle 9, since a single KGP-applying plugin fails the whole build under AGP 9. Thanks for maintaining the plus_plugins suite! 🙏