Remove built-in Kotlin workaround for plugin authors - #13857
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the migration guide for plugin authors by removing the section on supporting Flutter versions earlier than 3.44 and adding a warning that migrating to built-in Kotlin requires Flutter 3.44 or higher. The feedback suggests combining the consecutive warning blocks into a single alert to improve readability and comply with documentation style guidelines.
| :::warning | ||
| Migrating to built-in Kotlin requires a minimum Flutter version of 3.44. | ||
|
|
||
| This migration uses `kotlin.compilerOptions {}`, | ||
| which requires Kotlin Gradle Plugin (KGP) 2.0.0 or higher. | ||
| Flutter enforces a minimum KGP version of 2.0.0 starting in Flutter 3.44. | ||
| Plugin authors must update their plugin's minimum Flutter version | ||
| to at least 3.44 in `pubspec.yaml` when migrating. | ||
| ::: |
There was a problem hiding this comment.
According to the Google Developer Documentation Style Guidelines on Alerts, you should avoid placing multiple alert/warning boxes directly next to each other.
Since both warning blocks serve as prerequisites/applicability conditions for the migration, they can be combined into a single warning block to improve readability and visual flow.
Here is the suggested combined warning block:
:::warning
Migrating to built-in Kotlin requires a minimum Flutter version of 3.44.
This migration uses `kotlin.compilerOptions {}`,
which requires Kotlin Gradle Plugin (KGP) 2.0.0 or higher.
Flutter enforces a minimum KGP version of 2.0.0 starting in Flutter 3.44.
Plugin authors must update their plugin's minimum Flutter version
to at least 3.44 in `pubspec.yaml` when migrating.
This guide only applies to plugins that already use the
Kotlin Gradle Plugin (KGP).
To verify whether your plugin applies KGP,
find the `kotlin-android` plugin
(or the `org.jetbrains.kotlin.android` plugin).
It is likely located in the
`<plugin-project>/android/build.gradle` or
`<plugin-project>/android/build.gradle.kts` file.
To view the KGP application code,
see [Update the Gradle file](#update-the-gradle-file).
If your plugin project doesn't currently apply KGP,
don't migrate to built-in Kotlin.
:::References
- Avoid placing multiple alert/warning boxes directly next to each other. (link)
|
Staged preview of the updated docs.flutter.dev site (updated for commit 7b61013): https://flutter-docs-prod--docs-pr13857-remove-3-44-workaround-zaw5rfmm.web.app |
|
Staged preview of the updated flutter.dev site (updated for commit 7b61013): https://flutter-dev-230821--www-pr13857-remove-3-44-workaround-cpgzq5qz.web.app |
Removes the "Support Flutter versions earlier than 3.44" workaround section from the built-in Kotlin plugin migration guide.
This pre-emptively removes the workaround to discourage plugin authors from adopting the Flutter 3.44 workaround across mixed migration states. Migrating to built-in Kotlin requires Flutter 3.44 or later because
kotlin.compilerOptions {}requires KGP 2.0.0 or higher.If we decide we actually want to allow plugin authors to use this workaround, we can always add it back later. This removal is to prevent further potential damage.
For more on removing the workaround, see this internal doc here.
Presubmit checklist
of 80 characters or fewer.