Skip to content

Migrate to built-in Kotlin#137

Closed
ubxty wants to merge 1 commit into
fluttercommunity:mainfrom
ubxty:migrate-to-built-in-kotlin
Closed

Migrate to built-in Kotlin#137
ubxty wants to merge 1 commit into
fluttercommunity:mainfrom
ubxty:migrate-to-built-in-kotlin

Conversation

@ubxty
Copy link
Copy Markdown

@ubxty ubxty commented Jun 8, 2026

Migrates the plugin to use built-in Kotlin per the official Flutter
migration guide:
https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors

AGP 9.0 will remove support for plugins that apply the Kotlin Gradle
Plugin. This PR removes the legacy apply plugin: "kotlin-android"
line and the KGP classpath from android/build.gradle, and the same
from the example app's example/android/app/build.gradle.

The example app builds cleanly with flutter build apk --debug on
Flutter 3.44.1 with no KGP deprecation warnings for wakelock_plus.

Bumps the minimum Flutter version to 3.44.0 and Dart SDK to 3.12.0,
as required by the new kotlin.compilerOptions DSL.

Fixes the warning: "Your app uses the following plugins that apply
Kotlin Gradle Plugin (KGP)".

Migrates the plugin to use built-in Kotlin per the official Flutter
migration guide:
https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors

AGP 9.0 will remove support for plugins that apply the Kotlin Gradle
Plugin. This commit removes the legacy `apply plugin: "kotlin-android"`
line and the KGP classpath from `android/build.gradle`, and the same
from the example app's `example/android/app/build.gradle`.

The example app builds cleanly with `flutter build apk --debug` on
Flutter 3.44.1 with no KGP deprecation warnings for wakelock_plus.

Bumps the minimum Flutter version to 3.44.0 and Dart SDK to 3.12.0,
as required by the new `kotlin.compilerOptions` DSL.

Fixes the warning: "Your app uses the following plugins that apply
Kotlin Gradle Plugin (KGP)".
@ubxty
Copy link
Copy Markdown
Author

ubxty commented Jun 8, 2026

Closing as a duplicate of #136 which was opened 9 days ago by drmirk and is doing the same migration. Happy to coordinate or help with that PR if it's stuck on a specific issue.

@ubxty ubxty closed this Jun 8, 2026
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.

1 participant