Skip to content

Remove built-in Kotlin workaround for plugin authors - #13857

Open
jesswrd wants to merge 2 commits into
flutter:mainfrom
jesswrd:remove-3.44-workaround
Open

Remove built-in Kotlin workaround for plugin authors#13857
jesswrd wants to merge 2 commits into
flutter:mainfrom
jesswrd:remove-3.44-workaround

Conversation

@jesswrd

@jesswrd jesswrd commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@jesswrd
jesswrd requested review from a team and sfshaza2 as code owners September 4, 2026 02:20
@jesswrd
jesswrd requested a review from mboetger September 4, 2026 02:21

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +9 to +17
:::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.
:::

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. Avoid placing multiple alert/warning boxes directly next to each other. (link)

@jesswrd jesswrd Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed done

@flutter-website-bot

flutter-website-bot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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

@flutter-website-bot

flutter-website-bot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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

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.

2 participants