Skip to content

[CP-Beta] Raise Warn Version to AGP 9+#189293

Merged
auto-submit[bot] merged 2 commits into
flutter:flutter-3.47-candidate.0from
jesswrd:raise-warn-3.47
Jul 21, 2026
Merged

[CP-Beta] Raise Warn Version to AGP 9+#189293
auto-submit[bot] merged 2 commits into
flutter:flutter-3.47-candidate.0from
jesswrd:raise-warn-3.47

Conversation

@jesswrd

@jesswrd jesswrd commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This was a manual cherry pick of #189109 and of #189229.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#189228

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

This affects all Flutter Android apps and add-to-app integrations below the new warn and error version thresholds. Apps below the warn version will successfully build with warning logs urging an upgrade. Apps below the error version will fail to build and receive logs to upgrade.

New Warn Version
AGP: 9.0.1
Gradle: 9.1.0
KGP: 2.3.20

New Error Version
AGP: 8.11.1
Gradle: 8.14
KGP: 2.2.20

Changelog Description:

Explain this cherry pick:

  • In one line that is accessible to most Flutter developers.
  • That describes the state prior to the fix.
  • That includes which platforms are impacted.
    See best practices for examples.

< Replace with changelog description here >
flutter/189383: When building Flutter Android apps and add-to-app modules using AGP < 9, the tool does not prompt developers to upgrade to AGP 9+ or log Built-in Kotlin migration warnings.

Workaround:

Is there a workaround for this issue?

This change must be made. More develoeprs should upgrade to AGP 9+ to receive Built-in Kotlin migration warnings. To urge more developers to migrate to AGP 9+, we must raise the warn version to AGP 9+ to urge a larger chunk of our developers to migrate to AGP 9+. This must be done in this release because we don't have many Flutter releases left before AGP 10 releases.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?
To validate the new warn version:

  • flutter create a new app
  • change versions to just below the warn version AGP: 9.0.1, Gradle: 9.1.0 KGP: 2.3.20 in settings.gradle.kts
  • flutter build apk and the build is successful but you will see logs urging you to upgrade.
  • change versions to the warn version GP: 9.0.1, Gradle: 9.1.0 KGP: 2.3.20 in settings.gradle.kts
    -flutter build apk and the build is successful and you will see no logs

To validate the new error version:

  • change versions to just below the error version AGP: 8.11.1, Gradle: 8.14 KGP: 2.2.20 in settings.gradle.kts
  • flutter build apk and the build will fail and you will see logs urging you to upgrade.
  • change versions to the error version AGP: 8.11.1, Gradle: 8.14 KGP: 2.2.20 in settings.gradle.kts
    -flutter build apk and the build is successful and you will see no logs

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop e: impeller Impeller rendering backend issues and features requests team-android Owned by Android platform team team-windows Owned by the Windows platform team and removed platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. e: impeller Impeller rendering backend issues and features requests team-android Owned by Android platform team labels Jul 10, 2026
@jesswrd
jesswrd changed the base branch from master to flutter-3.46-candidate.0 July 10, 2026 21:51
@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@jesswrd jesswrd added the CICD Run CI/CD label Jul 10, 2026
@github-actions github-actions Bot added platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. team-android Owned by Android platform team and removed engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop team-windows Owned by the Windows platform team labels Jul 10, 2026
@jesswrd
jesswrd marked this pull request as draft July 14, 2026 07:05
@jesswrd jesswrd changed the title [CP-Beta] Raise Warn Version to AGP 9+ [WIP] [CP-Beta] Raise Warn Version to AGP 9+ Jul 14, 2026
@jesswrd
jesswrd changed the base branch from flutter-3.46-candidate.0 to flutter-3.47-candidate.0 July 14, 2026 07:21
@jesswrd
jesswrd dismissed gmackall’s stale review July 14, 2026 07:21

The base branch was changed.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop team-windows Owned by the Windows platform team labels Jul 14, 2026
jesswrd added 2 commits July 14, 2026 10:45
Raised warn version to AGP 9.0.1 and error version to right before AGP 9
for upcoming stable release. This way, most Flutter Android developers
will upgrade their AGP version to 9.0.1, which means they will start
seeing the Built-in Kotlin migration warnings.

Since I intend on CP-ing this to beta, this PR contains the minimum
required changes to raise the warn version to AGP 9.0.1 and the error
version to 9.0.1. As in I changed
`packages/flutter_tools/gradle/src/main/kotlin/DependencyVersionChecker.kt`
and a lot of presubmits failed. All other changes had to be made in
order to pass presubmits. The following test projects (or tests with
projects) had minimal dependency upgrades in a while, so tests failed
because they fell below the error version:

-
`flutter/dev/integration_tests/module_host_with_custom_build_v2_embedding`
-
`flutter/dev/integration_tests/pure_android_host_apps/android_custom_host_app`
-
`flutter/packages/flutter_tools/test/integration.shard/test_data/deferred_components_project.dart`
-
`flutter/packages/flutter_tools/test/integration.shard/android_gradle_legacy_flutter_plugins_strings_in_comments_test.dart`
-
`flutter/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart`
-
`flutter/packages/flutter_tools/test/android_java17_integration.shard/android_dependency_version.dart`

In this PR, I upgraded those dependency versions to the error version
(the minimum change required). In a future PR (issue
[here](flutter#189119)), I will align
those project dependency versions with the current template versions (or
at least a safer/modern version between the warn version and template
version).

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…#189229)

I raised the warn and error version in this PR:
flutter#189109. The dependencies used by
`flutter_engine_group_performance` were not updated as a part of that
PR. I missed that update earlier, and I'm guessing that
`flutter_engine_group_performance` is post-submit test.

Fixes flutter#189228 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
@github-actions github-actions Bot removed a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop f: integration_test The flutter/packages/integration_test plugin team-windows Owned by the Windows platform team labels Jul 14, 2026
@jesswrd
jesswrd requested a review from gmackall July 14, 2026 18:48
@jesswrd
jesswrd marked this pull request as ready for review July 14, 2026 18:49

@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 warning and error thresholds for Gradle, AGP, and KGP versions across the Flutter codebase, including the dependency checker, build configurations, and integration tests. The review feedback highlights a test in android_dependency_version_checking_test.dart that will fail because its test versions fall below the new warning thresholds, and points out a redundant duplicate VersionTuple entry in android_java17_dependency_smoke_tests.dart that should be removed.

Comment thread dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart
@jesswrd
jesswrd requested a review from justinmc July 14, 2026 18:54
@jesswrd jesswrd changed the title [WIP] [CP-Beta] Raise Warn Version to AGP 9+ [CP-Beta] Raise Warn Version to AGP 9+ Jul 14, 2026
@jesswrd
jesswrd requested review from camsim99 and removed request for justinmc July 17, 2026 18:02
@camsim99 camsim99 added the cp: review Cherry-picks in the review queue label Jul 20, 2026
@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 21, 2026
@auto-submit
auto-submit Bot merged commit 518263c into flutter:flutter-3.47-candidate.0 Jul 21, 2026
151 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD cp: review Cherry-picks in the review queue platform-android Android applications specifically team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants