Skip to content

[Android] Add Flutter 3.50 breaking-change pages for build tool minimums and the Flutter Gradle Plugin Variant API migration - #14053

Draft
reidbaker-agent wants to merge 2 commits into
flutter:mainfrom
reidbaker-agent:android-3.50-build-breaking-changes
Draft

reidbaker-agent wants to merge 2 commits into
flutter:mainfrom
reidbaker-agent:android-3.50-build-breaking-changes

Conversation

@reidbaker-agent

@reidbaker-agent reidbaker-agent commented Nov 10, 2026 •

Copy link
Copy Markdown

Description of what this PR is changing or adding, and why:

Adds two breaking-change pages that Android developers need before
upgrading to Flutter 3.50 (stable release planned for 2026-11-12), and lists
them under "Released in Flutter 3.50" in the breaking-changes index.

  1. Raised minimum Android build tool versions
    (/release/breaking-changes/android-build-tool-minimum-versions)
    • Flutter 3.50 raises the minimum AGP to 9.1.1 (from 8.11.1),
      Gradle to 9.3.1 (from 8.14.0), and KGP to 2.4.10 (from 2.2.20,
      only when KGP is applied). Template defaults are AGP 9.3.1 /
      Gradle 9.5.0 / KGP 2.4.20. AGP 10+ is rejected with a new error.
    • Calls out that the AGP minimum (9.1.1) is above the version Flutter 3.47
      warned about (9.0.1), so AGP 9.0.1–9.1.0 users get no advance warning.
    • Explains how built-in Kotlin (android.builtInKotlin=false) and the
      new AGP DSL (android.newDsl=false) properties are handled when a
      project moves to AGP 9 as part of this upgrade, and links to the existing
      built-in Kotlin guides for app developers and plugin authors.
    • Documents that KGP validation is skipped for built-in Kotlin projects,
      that version checks now run first, and the bypass flag.
  2. Flutter Gradle Plugin uses the Android Gradle Plugin Variant API
    (/release/breaking-changes/flutter-gradle-plugin-variant-api)
    • Publishes the user-facing content of
      docs/platforms/android/website-page-draft.md,
      adjusted to the state actually shipping in 3.50: the FGP itself no longer
      uses the legacy variant API (applicationVariants, libraryVariants,
      versionCodeOverride, AGP internals), but android.newDsl=false is
      still set by templates and the migrator, so users' own legacy build
      script code keeps working in 3.50. The page tells them to migrate now.
    • User-visible behavior changes: copyFlutterApks<Variant> task,
      per-ABI versionCode computed from the DSL (with the "multiply by
      10000" worked example), custom build types copied with initWith
      (native debuggability caveat), Flutter assets as a generated source
      directory, lazy task registration / CopyFlutterAssetsTask type,
      add-to-app changes (flutter.hostAppProjectName no-op, build mode
      follows the consumed module variant), and flutter build aar
      singleVariant behavior.
    • Migration guide with Kotlin DSL examples for APK renaming,
      per-ABI versionCode, custom build types, task lookup, add-to-app
      hosts, and plugin authors, plus the temporary android.newDsl=false
      escape hatch.

Facts were verified against the flutter-3.50-candidate.0 branch
(DependencyVersionChecker.kt, gradle_utils.dart, FlutterPlugin.kt,
templates, and migrations), the merged PRs listed in each page's
References section, and an independent fact-check pass whose corrections
are in the second commit.

Follow-ups once this lands (tracked in flutter/flutter#193713): point the
FlutterPlugin.kt KDoc and the contributor doc at the published URL, and
reduce website-page-draft.md to a pointer.

Important

Release-risk finding surfaced while writing this: every project created
with the Flutter 3.44 or 3.47 templates is below the new 3.50 minimums
(3.44 templates: AGP 9.0.1 / KGP 2.3.20; 3.47 templates: AGP 9.1.0 /
KGP 2.4.0; 3.50 minimums: AGP 9.1.1 / KGP 2.4.10), and nothing migrates
those versions automatically. Such projects fail to build on 3.50 until the
developer edits settings.gradle.kts. The minimum-versions page now says
this in its warning box. Please confirm this is the intended policy before
the stable release.

Issues fixed by this PR (if any):

PRs or commits this PR depends on (if any):

None. Intended to land with the Flutter 3.50 stable release.

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.

Adds two breaking-change pages for the Flutter 3.50 stable release and
lists them in the index:

- Raised minimum Android build tool versions: AGP 9.1.1, Gradle 9.3.1,
  KGP 2.4.10 (when applied), AGP 10 unsupported, and how built-in
  Kotlin and the new AGP DSL properties interact with the upgrade.
- Flutter Gradle Plugin uses the Android Gradle Plugin Variant API:
  user-visible behavior changes from migrating the Flutter Gradle
  Plugin to public AGP APIs (APK copy task, per-ABI versionCode,
  custom build types, assets, add-to-app, flutter build aar) and a
  migration guide for legacy applicationVariants usage.

Fixes flutter/flutter#193713 (publishes the website-page-draft).
- Call out that projects created with Flutter 3.44/3.47 templates
  (AGP 9.0.1/9.1.0, KGP 2.3.20/2.4.0) are below the new minimums.
- Correct the AGP error message sample and the AGP 10 message.
- Clarify when the KGP check applies (Flutter auto-applies KGP when
  android.builtInKotlin=false), and that checks run before the plugin
  reads the Android DSL rather than 'before anything else'.
- Fix apkanalyzer command (manifest version-code).
- Describe the 3.50 migrator behavior for android.newDsl accurately and
  document opting in with android.newDsl=true + android.builtInKotlin=true.
- Note finalizeDsl ordering for versionCode and where the
  flutter.hostAppProjectName warning is visible.
@sfshaza2

sfshaza2 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

@reidbaker, should this be in draft? Let me know if we should get this moving...

@reidbaker

Copy link
Copy Markdown
Member

@reidbaker, should this be in draft? Let me know if we should get this moving...

Yes it should be until I review it and say it is ready for human (non agent) eyes.

@reidbaker
reidbaker self-requested a review November 11, 2026 21:10
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.

Publish the Flutter Gradle Plugin AGP public API breaking-change page to docs.flutter.dev and update links to it

3 participants