Skip to content

Commit e4e0147

Browse files
AbdeMohlbiflutter-zl
authored andcommitted
bump KGP and AGP max known versions (flutter#181325)
Fixes flutter#181228 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [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]. **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 [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
1 parent 850726b commit e4e0147

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎packages/flutter_tools/lib/src/android/gradle_utils.dart‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const maxKnownAndSupportedGradleVersion = '9.1.0';
7979
//
8080
// Supported here means supported by the tooling for
8181
// flutter analyze --suggestions and does not imply broader flutter support.
82-
const maxKnownAndSupportedKgpVersion = '2.2.20';
82+
const maxKnownAndSupportedKgpVersion = '2.3.0';
8383

8484
// Update this when new versions of AGP come out.
8585
//
@@ -92,7 +92,7 @@ const maxKnownAndSupportedAgpVersion = '9.0';
9292
//
9393
// Supported here means supported by the tooling for
9494
// flutter analyze --suggestions and does not imply broader flutter support.
95-
const maxKnownAgpVersionWithFullKotlinSupport = '8.11.1';
95+
const maxKnownAgpVersionWithFullKotlinSupport = '8.13.0';
9696

9797
// Update this when new versions of AGP come out.
9898
const maxKnownAgpVersion = '9.0';
@@ -683,6 +683,12 @@ bool validateAgpAndKgp(Logger logger, {required String? kgpV, required String? a
683683
// Continuous KGP version handling is prefered in case an emergency patch to a
684684
// past release is shipped this code will assume the version range that is closest.
685685

686+
// Documented max is 2.3.0
687+
if (isWithinVersionRange(kgpV, min: '2.3.0', max: '2.3.0')) {
688+
// Documented max is 8.13.0
689+
return isWithinVersionRange(agpV, min: '8.2.2', max: '8.14', inclusiveMax: false);
690+
}
691+
686692
// Documented max is 2.2.20
687693
if (isWithinVersionRange(kgpV, min: '2.2.20', max: '2.2.29')) {
688694
// Documented max is 8.11.1

‎packages/flutter_tools/test/general.shard/android/gradle_utils_test.dart‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,15 +1007,16 @@ pluginManagement {
10071007
),
10081008

10091009
// Kotlin version at the edge of support window.
1010+
KgpAgpTestData(true, kgpVersion: '2.3.0', agpVersion: '8.13.0'),
1011+
KgpAgpTestData(true, kgpVersion: '2.3.0', agpVersion: '8.2.2'),
10101012
KgpAgpTestData(true, kgpVersion: '2.2.20', agpVersion: '8.11.1'),
10111013
KgpAgpTestData(true, kgpVersion: '2.2.20', agpVersion: '7.3.1'),
10121014
KgpAgpTestData(true, kgpVersion: '2.2.0', agpVersion: '8.10.0'),
10131015
KgpAgpTestData(true, kgpVersion: '2.1.21', agpVersion: '7.3.1'),
10141016
KgpAgpTestData(true, kgpVersion: '2.1.20', agpVersion: '8.7.2'),
10151017
KgpAgpTestData(true, kgpVersion: '2.1.20', agpVersion: '7.3.1'),
10161018
// AGP Versions not "fully supported" by kotlin
1017-
KgpAgpTestData(true, kgpVersion: '2.2.20', agpVersion: '8.13'),
1018-
KgpAgpTestData(true, kgpVersion: '2.2.20', agpVersion: '8.12'),
1019+
KgpAgpTestData(true, kgpVersion: '2.3.0', agpVersion: '9.0'),
10191020
// Gradle versions inspired by
10201021
// https://developer.android.com/build/releases/gradle-plugin#expandable-1
10211022
KgpAgpTestData(true, kgpVersion: '2.1.5', agpVersion: '8.7'),
@@ -1048,6 +1049,8 @@ pluginManagement {
10481049
KgpAgpTestData(false, kgpVersion: '1.9.25', agpVersion: '4.2.1'),
10491050
KgpAgpTestData(false, kgpVersion: '1.8.20', agpVersion: '4.1.2'),
10501051
// Kotlin too old for gradle version.
1052+
KgpAgpTestData(false, kgpVersion: '2.2.20', agpVersion: '8.13'),
1053+
KgpAgpTestData(false, kgpVersion: '2.2.20', agpVersion: '8.12'),
10511054
KgpAgpTestData(false, kgpVersion: '2.0.20', agpVersion: '8.7.2'),
10521055
KgpAgpTestData(false, kgpVersion: '2.0.20', agpVersion: '8.6'),
10531056
KgpAgpTestData(false, kgpVersion: '2.0.0', agpVersion: '8.4'),

0 commit comments

Comments
 (0)