Remove AGP-internal imports from VersionFetcher and migrate compileSdk/ndk reads to the public DSL - #2
Open
reidbaker-agent wants to merge 1 commit into
Open
Remove AGP-internal imports from VersionFetcher and migrate compileSdk/ndk reads to the public DSL#2reidbaker-agent wants to merge 1 commit into
reidbaker-agent wants to merge 1 commit into
Conversation
reidbaker-agent
force-pushed
the
agp-internal-utils
branch
from
July 22, 2026 15:54
ac19fbe to
8568ecf
Compare
reidbaker-agent
force-pushed
the
agp-api-doc
branch
2 times, most recently
from
July 28, 2026 13:35
0484449 to
9ac4b50
Compare
reidbaker-agent
force-pushed
the
agp-internal-utils
branch
from
July 28, 2026 13:35
8568ecf to
0caf4c3
Compare
reidbaker-agent
force-pushed
the
agp-api-doc
branch
from
July 28, 2026 13:37
9ac4b50 to
0e825d2
Compare
reidbaker-agent
force-pushed
the
agp-internal-utils
branch
from
July 28, 2026 13:37
0caf4c3 to
47b3ac5
Compare
…k/ndk reads to the public DSL Phase P1 of the AGP public-API migration (flutter#180137, flutter#166550): - VersionFetcher no longer calls the internal com.android.build.gradle.internal.utils.getKotlinAndroidPluginVersion. getKGPVersion now relies on the existing public fallback chain (kotlin_version property -> KotlinAndroidPluginWrapper.pluginVersion -> reflection) and documents that null is the expected result when KGP is absent (e.g. under AGP built-in Kotlin). DependencyVersionChecker already treats null as "KGP not required". - AgpCommonExtensionWrapper gains compileSdkPreview. - getCompileSdkFromProject now reads compileSdk/compileSdkPreview from the new DSL via the wrapper and returns a structured CompileSdkVersion instead of parsing the legacy "android-NN" string. The PluginHandler compileSdk mismatch warning uses CompileSdkVersion.isHigherThan, which defines the preview semantics the old string comparison got wrong (resolves the PluginHandler TODO): preview > numeric, distinct preview codenames incomparable (no warning), numeric compared numerically. Warning message text is unchanged. - getConfiguredNdkVersion reads through the wrapper instead of the legacy BaseExtension fallback. - Deletes the setAgpKotlinVersionToNull test helper (existed only to stub the internal AGP call) and updates unit tests accordingly; adds tests for both preview-vs-numeric directions and the codename reset case. Verification note: the FGP unit test suite could not be executed in this sandbox (the network policy blocks dl.google.com, so AGP artifacts do not resolve); run 'gradle test' in packages/flutter_tools/gradle in CI. Revert-safe until P2 lands.
reidbaker
force-pushed
the
agp-internal-utils
branch
from
July 31, 2026 18:07
47b3ac5 to
4aefffe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of 11 of the AGP public-API migration; stacked on #1.
Phase P1 of the AGP public-API migration (flutter#180137,
flutter#166550):
com.android.build.gradle.internal.utils.getKotlinAndroidPluginVersion.
getKGPVersion now relies on the existing public fallback chain
(kotlin_version property -> KotlinAndroidPluginWrapper.pluginVersion ->
reflection) and documents that null is the expected result when KGP is
absent (e.g. under AGP built-in Kotlin). DependencyVersionChecker
already treats null as "KGP not required".
the new DSL via the wrapper and returns a structured CompileSdkVersion
instead of parsing the legacy "android-NN" string. The PluginHandler
compileSdk mismatch warning uses CompileSdkVersion.isHigherThan, which
defines the preview semantics the old string comparison got wrong
(resolves the PluginHandler TODO): preview > numeric, distinct preview
codenames incomparable (no warning), numeric compared numerically.
Warning message text is unchanged.
legacy BaseExtension fallback.
stub the internal AGP call) and updates unit tests accordingly; adds
tests for both preview-vs-numeric directions and the codename reset
case.
Verification note: the FGP unit test suite could not be executed in this
sandbox (the network policy blocks dl.google.com, so AGP artifacts do
not resolve); run 'gradle test' in packages/flutter_tools/gradle in CI.
Revert-safe until P2 lands.
CI must run the FGP unit tests (the Kotlin suite in packages/flutter_tools/gradle could not run in the delivery sandbox: dl.google.com returns 403, so AGP artifacts do not resolve).