You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
native_workmanager (1.8.1, latest) applies the Kotlin Gradle Plugin
unconditionally in its android/build.gradle, which makes it a blocker for
Flutter's upcoming Built-in Kotlin migration. On current Flutter this
already surfaces as a build-time warning, and per the Flutter team future
Flutter versions will fail to build for any app depending on a plugin that
applies KGP.
Flutter warning
WARNING: Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP):
... native_workmanager ...
Future versions of Flutter will fail to build if your app uses plugins that apply KGP.
Please check the changelogs of these plugins and upgrade to a version that
supports Built-in Kotlin.
hey @kostyaten thanks for flagging this, good catch 🙏
turned out it was a bit worse than the warning. with android.builtInKotlin=true, 1.8.1 doesnt just warn, the build straight up fails with Failed to apply plugin 'kotlin-android'.
fixed in 1.8.2 (just published): the plugin doesnt apply KGP at all anymore (kotlinOptions → kotlin { compilerOptions { jvmTarget = JVM_17 } }). i checked the compiled plugin classes come out identical on 3.47.5 with builtInKotlin on and off, on AGP 8 apps with KGP in the root, and on 3.44.0. also did a fresh flutter create on 3.47.5 with builtInKotlin=true pulling 1.8.2 from pub.dev and it builds clean, no warning.
one heads up: min Flutter is now 3.44. thats the first version where flutter itself applies KGP to plugins when built-in kotlin is off, so below that the kotlin sources wouldnt compile. if your on older flutter pub will just keep you on 1.8.x.
theres also a small test now that runs flutters own detection regex over our build.gradle so this cant sneak back in. closing, but ping me if you still see the warning after upgrading. PRs: #77, release #79
Activity
ci: run only the plugin's Android unit tests, not every dependency's (#…
Merge pull request #77 from brewkits/fix/issue-76-builtin-kotlin
vietnguyentuan2019 commentedon Sep 23, 2026
hey @kostyaten thanks for flagging this, good catch 🙏
turned out it was a bit worse than the warning. with
android.builtInKotlin=true, 1.8.1 doesnt just warn, the build straight up fails withFailed to apply plugin 'kotlin-android'.fixed in 1.8.2 (just published): the plugin doesnt apply KGP at all anymore (
kotlinOptions→kotlin { compilerOptions { jvmTarget = JVM_17 } }). i checked the compiled plugin classes come out identical on 3.47.5 with builtInKotlin on and off, on AGP 8 apps with KGP in the root, and on 3.44.0. also did a freshflutter createon 3.47.5 with builtInKotlin=true pulling 1.8.2 from pub.dev and it builds clean, no warning.one heads up: min Flutter is now 3.44. thats the first version where flutter itself applies KGP to plugins when built-in kotlin is off, so below that the kotlin sources wouldnt compile. if your on older flutter pub will just keep you on 1.8.x.
theres also a small test now that runs flutters own detection regex over our build.gradle so this cant sneak back in. closing, but ping me if you still see the warning after upgrading. PRs: #77, release #79