Stop using Kotlin Gradle plugin
💬 Questions and Help
Provide question related to this flutter plugin. Flutter 3.44 requires all software packages to use built-in Kotlin instead of the Kotlin Gradle plugin. Read more: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
+1 — we're affected by this on Flutter 3.44.1 / AGP 9.0.1.
flutter build apk emits:
WARNING: Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): flutter_tts Future versions of Flutter will fail to build if your app uses plugins that apply KGP.
Our app side is already fully migrated to Built-in Kotlin (no kotlin-android in app/build.gradle.kts, android.builtInKotlin/android.newDsl flags set per the guide), so the only remaining source is this plugin: android/build.gradle in 4.2.5 still does apply plugin: 'kotlin-android'. The build still succeeds today thanks to Flutter's temporary KGP support, but that will be removed.
Plugin-author migration guide: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
Would be great to get a KGP-free release. Thanks for maintaining flutter_tts!
I'm getting the same warning with my app. I'm on Flutter 3.44.1, AGP 8.11.1.
Ditto, same here
We also hit this. Our app is migrated to AGP 9, but Flutter still restores android.builtInKotlin=false because flutter_tts 4.2.5 applies kotlin-android unconditionally.
#643 looks like the right patch. We can apply that PR on our project, run Android debug/release, and report whether configure/compile succeeds in that mode, if helpful.