[AGP 9] Update Flutter Template Versions#188762
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the default template versions for Gradle, the Android Gradle Plugin (AGP), and the Kotlin Gradle Plugin (KGP) across several configuration and test files. However, the feedback highlights critical issues: the specified KGP version (2.4.0) does not exist, and the AGP version (9.1.0) is unstable, both of which will break project builds. Additionally, the updates are missing corresponding required changes in other files, such as DependencyVersionChecker.kt and build.gradle.kts, to keep the configuration in sync.
gmackall
left a comment
There was a problem hiding this comment.
Bumping AGP to the newest stable version that is compatible with some corresponding stable Gradle and KGP version
Do there exist AGP stable versions which are newer, but which rely on unstable Gradle/KGP versions?
| // This AGP version will should match the Flutter create template values. | ||
| // In //packages/flutter_tools/lib/src/android/gradle_utils.dart | ||
| private val templateAgpVersion = AndroidPluginVersion(9, 0, 1) | ||
| private val templateAgpVersion = AndroidPluginVersion(9, 1, 0) |
There was a problem hiding this comment.
is there a reason why we don't use 9.1.1 (everywhere, not just here)?
gmackall
left a comment
There was a problem hiding this comment.
Per offline discussion, I think both questions are answered by
https://kotlinlang.org/docs/multiplatform/multiplatform-compatibility-guide.html#version-compatibility
which at time of writing only indicates that KGP 2.4.0 is compatibile with AGP 9.1.0 (but not 9.1.1).
LGTM!
Bumping AGP to the newest stable version that is compatible with some corresponding stable Gradle and KGP version. Will bump the warn version (to AGP 9+) and the error version to (right before AGP 9). Update to: AGP 9.1.0 (can't update to newer stable AGP version—not even the patch version—due to lack of KGP support [here](https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin)) Gradle 9.3.1 KGP 2.4.0 ## 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
) Bumping all Flutter test apps to align with newer AGP template versions: AGP 9.1.0 Gradle 9.3.1 KGP 2.4.0 Note: This looks like a massive change due to lockfile regeneration. Since we update test app dependency versions, we must regenerate their respective lockfiles. We use this script located at: `dev/tools/bin/generate_gradle_lockfiles.dart` to regenerate lockfiles. Related to: flutter#188762 ## 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
…12137) Manual roll Flutter from 6995038d96ef to 91939cc4db78 (48 revisions) Manual roll requested by stuartmorgan@google.com flutter/flutter@6995038...91939cc 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 80ae1deed9ed to 075fbe4778d9 (6 revisions) (flutter/flutter#189067) 2026-07-07 katelovett@google.com Bump customer testing version for new registrants (flutter/flutter#189070) 2026-07-07 engine-flutter-autoroll@skia.org Roll Packages from fc00ceb to 92525f5 (2 revisions) (flutter/flutter#189069) 2026-07-07 47866232+chunhtai@users.noreply.github.com fix android semantics integration test hangs due to postframe callback (flutter/flutter#189043) 2026-07-07 katelovett@google.com Bump goldctl (flutter/flutter#189030) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 71db7c06c5fe to 80ae1deed9ed (2 revisions) (flutter/flutter#189060) 2026-07-07 magder@google.com Collect analytics on AI agent usage (flutter/flutter#187630) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 125a76cc4cf3 to 71db7c06c5fe (4 revisions) (flutter/flutter#189054) 2026-07-07 engine-flutter-autoroll@skia.org Roll Dart SDK from 70577d6f2bba to c648e3429d76 (1 revision) (flutter/flutter#189052) 2026-07-07 vuhoangminh97@gmail.com Fix RenderSliverPadding setter assertion (flutter/flutter#187353) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 2dde156aec3e to 125a76cc4cf3 (3 revisions) (flutter/flutter#189037) 2026-07-07 49402500+fahaddoc@users.noreply.github.com Explain asynchronous causes in the setState() called after dispose() error (flutter/flutter#187294) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 7dccd1e79a5b to 2dde156aec3e (2 revisions) (flutter/flutter#189035) 2026-07-07 116356835+AbdeMohlbi@users.noreply.github.com Add `STRING_CATALOG_GENERATE_SYMBOLS = YES;` (flutter/flutter#188163) 2026-07-07 31859944+LongCatIsLooong@users.noreply.github.com Print warnings on Intel Macs / targeting Intel Macs (flutter/flutter#188835) 2026-07-07 engine-flutter-autoroll@skia.org Roll Dart SDK from 4c03f64b19f6 to 70577d6f2bba (1 revision) (flutter/flutter#189031) 2026-07-07 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from n1Lm2Z4DZkfC3bwj5... to 7RjQJBW3m-3Jl-7jr... (flutter/flutter#189032) 2026-07-06 31859944+LongCatIsLooong@users.noreply.github.com Recommend `OverlayPortal.overlayChildLayoutBuilder` over Target-Follower (flutter/flutter#188894) 2026-07-06 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#189025) 2026-07-06 matt.kosarek@canonical.com Rename preferredSize to size and preferredConstraints to constraints in the windowing API (flutter/flutter#189017) 2026-07-06 6655696+guidezpl@users.noreply.github.com Skip locked issues in no-response check (flutter/flutter#188950) 2026-07-06 47866232+chunhtai@users.noreply.github.com Fix potential race condtion in android_semantics_integration_test (flutter/flutter#188830) 2026-07-06 codefu@google.com ci: udpate wait-for-engine-build composite action to cocoon (flutter/flutter#189020) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 2b55eed5500d to 7dccd1e79a5b (3 revisions) (flutter/flutter#189021) 2026-07-06 jesswon@google.com [AGP 9] Update Flutter Template Versions (flutter/flutter#188762) 2026-07-06 126701490+richyo-codes@users.noreply.github.com fix(engine/windows): keep tooltip position rect alive - fix use after free (flutter/flutter#188476) 2026-07-06 bkonyi@google.com [Tool] Fix null check operator crash in currentPackageConfig (flutter/flutter#188454) 2026-07-06 bkonyi@google.com [Tool] Gracefully handle WDAC/AppLocker blocks for impellerc (flutter/flutter#188452) 2026-07-06 bkonyi@google.com [flutter_tools] Throw DaemonException if app fails to start early (flutter/flutter#188921) 2026-07-06 engine-flutter-autoroll@skia.org Roll Dart SDK from ce7a2567eb59 to 4c03f64b19f6 (2 revisions) (flutter/flutter#189015) 2026-07-06 bkonyi@google.com [flutter_tools, engine] Add --disable-service-origin-check option to disable VM service origin checks (flutter/flutter#188745) 2026-07-06 bkonyi@google.com [flutter_tools] Fix test flakiness in widget_preview_detection_test.dart (flutter/flutter#188922) 2026-07-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#189009) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from c0e2b9667d91 to 2b55eed5500d (1 revision) (flutter/flutter#189006) 2026-07-06 engine-flutter-autoroll@skia.org Roll Packages from 2fbe873 to fc00ceb (1 revision) (flutter/flutter#189007) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from b68567542f81 to c0e2b9667d91 (1 revision) (flutter/flutter#189004) 2026-07-06 Rusino@users.noreply.github.com Fixing multiline GetBoxesForRange (flutter/flutter#188803) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from e15ea7a4b927 to b68567542f81 (4 revisions) (flutter/flutter#189000) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 79806692425f to e15ea7a4b927 (2 revisions) (flutter/flutter#188992) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 2826ae6dc649 to 79806692425f (1 revision) (flutter/flutter#188991) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 7f99eee20fd6 to 2826ae6dc649 (1 revision) (flutter/flutter#188990) 2026-07-06 737941+loic-sharma@users.noreply.github.com Add debugPaintFocusBoxes (flutter/flutter#188288) 2026-07-05 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from bkK6BLiZDRnE7AQQj... to n1Lm2Z4DZkfC3bwj5... (flutter/flutter#188989) 2026-07-05 engine-flutter-autoroll@skia.org Roll Skia from 75a4bf6706bd to 7f99eee20fd6 (2 revisions) (flutter/flutter#188988) ...
…lutter#12137) Manual roll Flutter from 6995038d96ef to 91939cc4db78 (48 revisions) Manual roll requested by stuartmorgan@google.com flutter/flutter@6995038...91939cc 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 80ae1deed9ed to 075fbe4778d9 (6 revisions) (flutter/flutter#189067) 2026-07-07 katelovett@google.com Bump customer testing version for new registrants (flutter/flutter#189070) 2026-07-07 engine-flutter-autoroll@skia.org Roll Packages from fc00ceb to 92525f5 (2 revisions) (flutter/flutter#189069) 2026-07-07 47866232+chunhtai@users.noreply.github.com fix android semantics integration test hangs due to postframe callback (flutter/flutter#189043) 2026-07-07 katelovett@google.com Bump goldctl (flutter/flutter#189030) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 71db7c06c5fe to 80ae1deed9ed (2 revisions) (flutter/flutter#189060) 2026-07-07 magder@google.com Collect analytics on AI agent usage (flutter/flutter#187630) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 125a76cc4cf3 to 71db7c06c5fe (4 revisions) (flutter/flutter#189054) 2026-07-07 engine-flutter-autoroll@skia.org Roll Dart SDK from 70577d6f2bba to c648e3429d76 (1 revision) (flutter/flutter#189052) 2026-07-07 vuhoangminh97@gmail.com Fix RenderSliverPadding setter assertion (flutter/flutter#187353) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 2dde156aec3e to 125a76cc4cf3 (3 revisions) (flutter/flutter#189037) 2026-07-07 49402500+fahaddoc@users.noreply.github.com Explain asynchronous causes in the setState() called after dispose() error (flutter/flutter#187294) 2026-07-07 engine-flutter-autoroll@skia.org Roll Skia from 7dccd1e79a5b to 2dde156aec3e (2 revisions) (flutter/flutter#189035) 2026-07-07 116356835+AbdeMohlbi@users.noreply.github.com Add `STRING_CATALOG_GENERATE_SYMBOLS = YES;` (flutter/flutter#188163) 2026-07-07 31859944+LongCatIsLooong@users.noreply.github.com Print warnings on Intel Macs / targeting Intel Macs (flutter/flutter#188835) 2026-07-07 engine-flutter-autoroll@skia.org Roll Dart SDK from 4c03f64b19f6 to 70577d6f2bba (1 revision) (flutter/flutter#189031) 2026-07-07 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from n1Lm2Z4DZkfC3bwj5... to 7RjQJBW3m-3Jl-7jr... (flutter/flutter#189032) 2026-07-06 31859944+LongCatIsLooong@users.noreply.github.com Recommend `OverlayPortal.overlayChildLayoutBuilder` over Target-Follower (flutter/flutter#188894) 2026-07-06 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#189025) 2026-07-06 matt.kosarek@canonical.com Rename preferredSize to size and preferredConstraints to constraints in the windowing API (flutter/flutter#189017) 2026-07-06 6655696+guidezpl@users.noreply.github.com Skip locked issues in no-response check (flutter/flutter#188950) 2026-07-06 47866232+chunhtai@users.noreply.github.com Fix potential race condtion in android_semantics_integration_test (flutter/flutter#188830) 2026-07-06 codefu@google.com ci: udpate wait-for-engine-build composite action to cocoon (flutter/flutter#189020) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 2b55eed5500d to 7dccd1e79a5b (3 revisions) (flutter/flutter#189021) 2026-07-06 jesswon@google.com [AGP 9] Update Flutter Template Versions (flutter/flutter#188762) 2026-07-06 126701490+richyo-codes@users.noreply.github.com fix(engine/windows): keep tooltip position rect alive - fix use after free (flutter/flutter#188476) 2026-07-06 bkonyi@google.com [Tool] Fix null check operator crash in currentPackageConfig (flutter/flutter#188454) 2026-07-06 bkonyi@google.com [Tool] Gracefully handle WDAC/AppLocker blocks for impellerc (flutter/flutter#188452) 2026-07-06 bkonyi@google.com [flutter_tools] Throw DaemonException if app fails to start early (flutter/flutter#188921) 2026-07-06 engine-flutter-autoroll@skia.org Roll Dart SDK from ce7a2567eb59 to 4c03f64b19f6 (2 revisions) (flutter/flutter#189015) 2026-07-06 bkonyi@google.com [flutter_tools, engine] Add --disable-service-origin-check option to disable VM service origin checks (flutter/flutter#188745) 2026-07-06 bkonyi@google.com [flutter_tools] Fix test flakiness in widget_preview_detection_test.dart (flutter/flutter#188922) 2026-07-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#189009) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from c0e2b9667d91 to 2b55eed5500d (1 revision) (flutter/flutter#189006) 2026-07-06 engine-flutter-autoroll@skia.org Roll Packages from 2fbe873 to fc00ceb (1 revision) (flutter/flutter#189007) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from b68567542f81 to c0e2b9667d91 (1 revision) (flutter/flutter#189004) 2026-07-06 Rusino@users.noreply.github.com Fixing multiline GetBoxesForRange (flutter/flutter#188803) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from e15ea7a4b927 to b68567542f81 (4 revisions) (flutter/flutter#189000) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 79806692425f to e15ea7a4b927 (2 revisions) (flutter/flutter#188992) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 2826ae6dc649 to 79806692425f (1 revision) (flutter/flutter#188991) 2026-07-06 engine-flutter-autoroll@skia.org Roll Skia from 7f99eee20fd6 to 2826ae6dc649 (1 revision) (flutter/flutter#188990) 2026-07-06 737941+loic-sharma@users.noreply.github.com Add debugPaintFocusBoxes (flutter/flutter#188288) 2026-07-05 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from bkK6BLiZDRnE7AQQj... to n1Lm2Z4DZkfC3bwj5... (flutter/flutter#188989) 2026-07-05 engine-flutter-autoroll@skia.org Roll Skia from 75a4bf6706bd to 7f99eee20fd6 (2 revisions) (flutter/flutter#188988) ...
Bumping AGP to the newest stable version that is compatible with some corresponding stable Gradle and KGP version. Will bump the warn version (to AGP 9+) and the error version to (right before AGP 9).
Update to:
AGP 9.1.0 (can't update to newer stable AGP version—not even the patch version—due to lack of KGP support here)
Gradle 9.3.1
KGP 2.4.0
Fixes #189380
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-assistbot 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.