Replace the plugin build-type copy with initWith on the public DSL - #4
Open
reidbaker-agent wants to merge 1 commit into
Open
Replace the plugin build-type copy with initWith on the public DSL#4reidbaker-agent wants to merge 1 commit into
reidbaker-agent wants to merge 1 commit into
Conversation
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 22, 2026 15:54
fd41f02 to
dc99bbd
Compare
reidbaker-agent
force-pushed
the
agp-buildmode-deps
branch
2 times, most recently
from
July 28, 2026 13:35
0e7b3ee to
d177502
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 28, 2026 13:35
dc99bbd to
6e9a5d6
Compare
reidbaker-agent
force-pushed
the
agp-buildmode-deps
branch
from
July 28, 2026 13:37
d177502 to
f83ab12
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 28, 2026 13:37
6e9a5d6 to
8650166
Compare
reidbaker-agent
force-pushed
the
agp-buildmode-deps
branch
from
July 29, 2026 20:17
f83ab12 to
f068e04
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 29, 2026 20:17
8650166 to
46063e6
Compare
reidbaker-agent
force-pushed
the
agp-buildmode-deps
branch
from
July 29, 2026 20:42
f068e04 to
3996bce
Compare
reidbaker-agent
force-pushed
the
agp-plugin-buildtypes
branch
from
July 29, 2026 20:42
46063e6 to
bece987
Compare
Phase P3 of the AGP public-API migration (flutter#180137, flutter#166550): - PluginHandler no longer imports com.android.build.gradle.internal.dsl.BuildType. The build-type copy block that shared live legacy BuildType instances (addAll) for app-type plugin projects and hand-copied two properties for library plugin projects is replaced by a single initWith-based copy on the new-DSL containers: missing build types are created on the plugin project with initWith(appBuildType) (which carries matchingFallbacks), and isDebuggable is additionally copied when both sides are application build types. Library build types cannot receive app-specific properties through the public DSL - this is a documented behavior change of the migration (BuildConfig.DEBUG / JNI debuggability of plugins built for custom debuggable build types). - Production sources are now free of com.android.build.gradle.internal imports; InternalAgpApiImportTest locks that in (test sources may still use internals until the gradle-api dependency swap). - PluginHandlerTest: the two mock-only copy tests (which never invoked configurePlugins) are replaced with tests that run configurePlugins and assert the initWith copy for both a library plugin project and an app plugin project, including the custom-debuggable-build-type -> debug engine artifact mapping. - The planned pre-spike (afterEvaluate DSL mutation under newDsl=true) could not run in this sandbox; recorded in the migration doc with the finalizeDsl fallback. android_plugin_example_app_build and a custom build-type scratch build must confirm in CI. Verification note: FGP unit tests could not be executed in this sandbox (network policy blocks dl.google.com); run 'gradle test' (both AGP axes) in packages/flutter_tools/gradle in CI. Revert-safe until P4 lands.
reidbaker
force-pushed
the
agp-plugin-buildtypes
branch
from
July 31, 2026 18:07
bece987 to
ffbce64
Compare
reidbaker
force-pushed
the
agp-buildmode-deps
branch
from
July 31, 2026 18:07
3996bce to
5a528c3
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 4 of 11 of the AGP public-API migration; stacked on #3.
Phase P3 of the AGP public-API migration (flutter#180137,
flutter#166550):
The build-type copy block that shared live legacy BuildType instances
(addAll) for app-type plugin projects and hand-copied two properties
for library plugin projects is replaced by a single initWith-based
copy on the new-DSL containers: missing build types are created on
the plugin project with initWith(appBuildType) (which carries
matchingFallbacks), and isDebuggable is additionally copied when both
sides are application build types. Library build types cannot receive
app-specific properties through the public DSL - this is a documented
behavior change of the migration (BuildConfig.DEBUG / JNI
debuggability of plugins built for custom debuggable build types).
imports; InternalAgpApiImportTest locks that in (test sources may
still use internals until the gradle-api dependency swap).
configurePlugins) are replaced with tests that run configurePlugins
and assert the initWith copy for both a library plugin project and an
app plugin project, including the custom-debuggable-build-type ->
debug engine artifact mapping.
could not run in this sandbox; recorded in the migration doc with the
finalizeDsl fallback. android_plugin_example_app_build and a custom
build-type scratch build must confirm in CI.
Verification note: FGP unit tests could not be executed in this sandbox
(network policy blocks dl.google.com); run 'gradle test' (both AGP
axes) in packages/flutter_tools/gradle in CI.
Revert-safe until P4 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).