Add public buildModeFor overloads and wire Flutter dependencies through the new DSL - #3
Open
reidbaker-agent wants to merge 1 commit into
Open
Add public buildModeFor overloads and wire Flutter dependencies through the new DSL#3reidbaker-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-buildmode-deps
branch
from
July 22, 2026 15:54
e66a279 to
0e7b3ee
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-buildmode-deps
branch
from
July 28, 2026 13:35
0e7b3ee to
d177502
Compare
reidbaker-agent
force-pushed
the
agp-internal-utils
branch
from
July 28, 2026 13:37
0caf4c3 to
47b3ac5
Compare
reidbaker-agent
force-pushed
the
agp-buildmode-deps
branch
3 times, most recently
from
July 29, 2026 20:42
f068e04 to
3996bce
Compare
…gh the new DSL Phase P2 of the AGP public-API migration (flutter#180137, flutter#166550): - buildModeFor gains a (buildTypeName, isDebuggable) core overload and a new-DSL BuildType overload. Application and dynamic-feature build types use their public isDebuggable flag; library build types have no public debuggable signal at DSL scope, so the conventional "debug" name is used for them. The legacy com.android.builder.model.BuildType overload remains for the variant-scope call sites that migrate in later phases. - addFlutterDependencies (engine/embedding deps) now takes a new-DSL BuildType, and FlutterPlugin registers it via the wrapper's buildTypes container instead of the legacy BaseExtension. - PluginHandler's three dependency-wiring loops (per-build-type Api wiring, embedding deps, plugin-to-plugin deps) iterate the wrapper container. The build-type copy block still uses the legacy container and internal.dsl.BuildType; that is phase P3. - build.gradle.kts accepts -PagpVersion= so CI can compile and test the plugin against the AGP 9 line in addition to the default (the public DSL is not binary-compatible between AGP 8 and 9 everywhere), and a new validateNoCommonExtensionInBytecode task fails the build if any compiled main class references CommonExtension (the known-broken type that AgpCommonExtensionWrapper exists to avoid). - android_run_flutter_gradle_plugin_tests_test.dart gains a second test running the suite with -PagpVersion=<templateAndroidGradlePluginVersion>. - PluginHandlerTest no longer depends on exhausted-iterator mock behavior; the wrapper container returns a fresh iterator per call. Verification note: FGP unit tests could not be executed in this sandbox (network policy blocks dl.google.com); run 'gradle test' and 'gradle -PagpVersion=9.1.0 test' in packages/flutter_tools/gradle in CI. Revert-safe until P3 lands.
reidbaker
force-pushed
the
agp-buildmode-deps
branch
from
July 31, 2026 18:07
3996bce to
5a528c3
Compare
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 3 of 11 of the AGP public-API migration; stacked on #2.
Phase P2 of the AGP public-API migration (flutter#180137,
flutter#166550):
new-DSL BuildType overload. Application and dynamic-feature build
types use their public isDebuggable flag; library build types have no
public debuggable signal at DSL scope, so the conventional "debug"
name is used for them. The legacy com.android.builder.model.BuildType
overload remains for the variant-scope call sites that migrate in
later phases.
BuildType, and FlutterPlugin registers it via the wrapper's buildTypes
container instead of the legacy BaseExtension.
wiring, embedding deps, plugin-to-plugin deps) iterate the wrapper
container. The build-type copy block still uses the legacy container
and internal.dsl.BuildType; that is phase P3.
plugin against the AGP 9 line in addition to the default (the public
DSL is not binary-compatible between AGP 8 and 9 everywhere), and a
new validateNoCommonExtensionInBytecode task fails the build if any
compiled main class references CommonExtension (the known-broken
type that AgpCommonExtensionWrapper exists to avoid).
running the suite with -PagpVersion=<templateAndroidGradlePluginVersion>.
behavior; the wrapper container returns a fresh iterator per call.
Verification note: FGP unit tests could not be executed in this sandbox
(network policy blocks dl.google.com); run 'gradle test' and
'gradle -PagpVersion=9.1.0 test' in packages/flutter_tools/gradle in CI.
Revert-safe until P3 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).