Update gradle utils to know about kgp 2.3.10 constraints#183416
Update gradle utils to know about kgp 2.3.10 constraints#183416auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Kotlin Gradle Plugin (KGP) version constraints to support version 2.3.10. The changes are generally good, but I've identified a few issues: a logic gap in the version validation that could lead to incorrect behavior, an incorrect test case that will fail, and a misleading code comment. I've provided specific feedback and suggestions for each of these points in the review comments.
| // Documented max is 2.3.10 | ||
| if (isWithinVersionRange(kgpV, min: '2.3.10', max: '2.3.29')) { | ||
| // Documented max is 9.0.0 | ||
| return isWithinVersionRange(agpV, min: '8.2.2', max: '9.0.99', inclusiveMax: false); | ||
| } |
There was a problem hiding this comment.
This new validation block for KGP 2.3.10+ is good, but it creates a validation gap. The next block only handles 2.3.0 specifically, leaving versions 2.3.1 through 2.3.9 unhandled. These will fall through all checks and be considered valid by default because the function returns true at the end, which is likely not the intended behavior.
To fix this, please adjust the next validation block to cover the gap, for example by changing its range to min: '2.3.0', max: '2.3.9'.
| // Documented max is 9.0.0, using 9.0.99 non inclusive covers patch versions. | ||
| return isWithinVersionRange(gradleV, min: '7.6.3', max: '9.0.99', inclusiveMax: false); | ||
| } | ||
| // Documented max is 2.3.0, using 2.2.29 covers patch versions. |
There was a problem hiding this comment.
This comment appears to be incorrect. It states "Documented max is 2.3.0", but the following code block checks for KGP versions 2.2.20 to 2.2.29. This seems to be a copy-paste error and could be confusing for future maintenance. Please correct the comment to match the code it describes.
| // Documented max is 2.3.0, using 2.2.29 covers patch versions. | |
| // Documented max is 2.2.20, using 2.2.29 covers patch versions. |
| KgpAgpTestData(true, kgpVersion: '2.1.20', agpVersion: '7.3.1'), | ||
| // AGP Versions not "fully supported" by kotlin | ||
| KgpAgpTestData(true, kgpVersion: '2.3.0', agpVersion: '9.0'), | ||
| KgpAgpTestData(true, kgpVersion: '2.3.10', agpVersion: '9.1'), |
There was a problem hiding this comment.
This test case expects validateAgpAndKgp to return true for KGP 2.3.10 and AGP 9.1. However, based on the implementation in gradle_utils.dart, the valid AGP range for KGP 2.3.10 is min: '8.2.2', max: '9.0.99', inclusiveMax: false. AGP version 9.1 is outside this range, so the function will return false, causing this test to fail.
Please either update the test to expect false, or if AGP 9.1 is indeed compatible, update the version range in validateAgpAndKgp. Given the comment // Documented max is 9.0.0 in gradle_utils.dart, it seems the test expectation is incorrect.
| KgpAgpTestData(true, kgpVersion: '2.3.10', agpVersion: '9.1'), | |
| KgpAgpTestData(false, kgpVersion: '2.3.10', agpVersion: '9.1'), |
Roll Flutter from 732e05dd483c to d117642c18e0 (47 revisions) flutter/flutter@732e05d...d117642 2026-03-17 [email protected] Roll Skia from fa3bb1f60d99 to dba893a44d7a (1 revision) (flutter/flutter#183783) 2026-03-17 [email protected] [ios][pv]fix admob banner scrollable on ios 18.2 (flutter/flutter#183274) 2026-03-17 [email protected] Roll Packages from 0f2eeae to a9d36fb (2 revisions) (flutter/flutter#183782) 2026-03-17 [email protected] Update goldctl version (flutter/flutter#183538) 2026-03-17 [email protected] Roll Skia from 69be1087807b to fa3bb1f60d99 (1 revision) (flutter/flutter#183779) 2026-03-17 [email protected] Roll Dart SDK from 38dedf00c2cd to 30cdd2634429 (1 revision) (flutter/flutter#183778) 2026-03-17 [email protected] Roll Fuchsia Linux SDK from s7rq9m8tH2aZtX-kP... to zYBvfzIH95BY3cCzL... (flutter/flutter#183777) 2026-03-17 [email protected] Roll Skia from 4ea039236580 to 69be1087807b (2 revisions) (flutter/flutter#183772) 2026-03-17 [email protected] Roll Skia from fb402093cfb5 to 4ea039236580 (1 revision) (flutter/flutter#183770) 2026-03-17 [email protected] Roll Skia from d6bc6d17d637 to fb402093cfb5 (8 revisions) (flutter/flutter#183765) 2026-03-17 [email protected] Roll Dart SDK from ff50ab8ecea4 to 38dedf00c2cd (2 revisions) (flutter/flutter#183764) 2026-03-17 [email protected] Wrap EGL image usage in a GObject (flutter/flutter#183539) 2026-03-17 [email protected] Adds platform_view_test_macos_impeller (flutter/flutter#183760) 2026-03-17 [email protected] Adds flush to metal screenshotter. (flutter/flutter#183758) 2026-03-16 [email protected] Add a platform OpenGL context. (flutter/flutter#183715) 2026-03-16 [email protected] Fix formatting, capitalization, and grammar in activation issue template (flutter/flutter#183061) 2026-03-16 [email protected] Roll Dart SDK from 4a6febbf882e to ff50ab8ecea4 (2 revisions) (flutter/flutter#183739) 2026-03-16 [email protected] docs: add code review guidance to CONTRIBUTING.md (flutter/flutter#182778) 2026-03-16 [email protected] Filter 'waiting for customer response' issues from macOS triage (flutter/flutter#183552) 2026-03-16 [email protected] Adds github action to reset cicd when new branches come (flutter/flutter#183675) 2026-03-16 [email protected] Adds macos impeller complex layout performance test (flutter/flutter#183669) 2026-03-16 [email protected] Roll Dart SDK from b74e5b537d71 to 4a6febbf882e (2 revisions) (flutter/flutter#183695) 2026-03-16 [email protected] Use properties to configure leak_tracking and test_randomization_off in .ci.yaml (flutter/flutter#183605) 2026-03-16 [email protected] [flutter_tools] Avoid File.exists and File.stat, as per enforced lint rule (flutter/flutter#183463) 2026-03-16 [email protected] Properly parse URIs for testPath when the host is running on Windows. (flutter/flutter#176881) 2026-03-16 [email protected] Roll Packages from 91f7c33 to 0f2eeae (6 revisions) (flutter/flutter#183730) 2026-03-16 [email protected] Roll Skia from a6ccaf95c6e0 to d6bc6d17d637 (5 revisions) (flutter/flutter#183726) 2026-03-16 [email protected] Roll Fuchsia Linux SDK from WOfyEFkxf9JX26VS-... to s7rq9m8tH2aZtX-kP... (flutter/flutter#183723) 2026-03-15 [email protected] Roll Skia from 34ace196b838 to a6ccaf95c6e0 (2 revisions) (flutter/flutter#183712) 2026-03-14 [email protected] Roll Fuchsia Linux SDK from vAWG8mRvsQHblDBsy... to WOfyEFkxf9JX26VS-... (flutter/flutter#183694) 2026-03-14 [email protected] Roll Skia from 06106120c6bf to 34ace196b838 (1 revision) (flutter/flutter#183677) 2026-03-14 [email protected] Roll Dart SDK from 6a3dc9d4f881 to b74e5b537d71 (2 revisions) (flutter/flutter#183676) 2026-03-14 [email protected] Add some quality of life improvements to the release GitHub workflows. (flutter/flutter#183658) 2026-03-14 [email protected] Fix RouteAware.didPushNext documentation inaccuracy (flutter/flutter#183097) 2026-03-13 [email protected] Adds complex layout impeller startup benchmark (flutter/flutter#183655) 2026-03-13 [email protected] Adds switch for sdf rendering plus golden tests (flutter/flutter#183543) 2026-03-13 [email protected] Made complex_layout_scroll_perf explicitly skia (flutter/flutter#183663) 2026-03-13 [email protected] Update android integration test to match the current android semantics (flutter/flutter#183548) 2026-03-13 [email protected] Roll Skia from 6c0346103c24 to 06106120c6bf (3 revisions) (flutter/flutter#183654) 2026-03-13 [email protected] Roll Dart SDK from d5f6d3c17499 to 6a3dc9d4f881 (1 revision) (flutter/flutter#183652) 2026-03-13 [email protected] Fix PinnedHeaderSliver semantics focus capture (flutter/flutter#179023) 2026-03-13 [email protected] [a11y][android] In Android 16, sendWindowContentChangeEvent when check state changes (flutter/flutter#183606) 2026-03-13 [email protected] Update gradle utils to know about kgp 2.3.10 constraints (flutter/flutter#183416) 2026-03-13 [email protected] Roll Skia from 029229d8be91 to 6c0346103c24 (5 revisions) (flutter/flutter#183648) 2026-03-13 [email protected] Roll Fuchsia Linux SDK from jJbpv4J_tjW-wuKDq... to vAWG8mRvsQHblDBsy... (flutter/flutter#183646) 2026-03-13 [email protected] [flutter_tools] Support flavors and transformers for shaders (flutter/flutter#181889) ...
I noticed that kgp 2.3.10 was released so I went to update the code that

--suggestionsrelies on.Pre-launch Checklist
///).