Unify add-to-app module wiring on the variant API and drop host-project cross-wiring - #8
Open
reidbaker-agent wants to merge 1 commit into
Open
Unify add-to-app module wiring on the variant API and drop host-project cross-wiring#8reidbaker-agent wants to merge 1 commit into
reidbaker-agent wants to merge 1 commit into
Conversation
reidbaker-agent
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 22, 2026 15:54
c051ed0 to
1d44353
Compare
reidbaker-agent
force-pushed
the
agp-add-to-app
branch
from
July 22, 2026 15:54
2e0119f to
d384683
Compare
reidbaker-agent
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 28, 2026 13:36
1d44353 to
f3d2a31
Compare
reidbaker-agent
force-pushed
the
agp-add-to-app
branch
from
July 28, 2026 13:36
d384683 to
190cb3b
Compare
reidbaker-agent
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 28, 2026 13:37
f3d2a31 to
91f0814
Compare
reidbaker-agent
force-pushed
the
agp-add-to-app
branch
from
July 28, 2026 13:37
190cb3b to
f861ab5
Compare
reidbaker-agent
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 29, 2026 20:21
91f0814 to
45e5dea
Compare
reidbaker-agent
force-pushed
the
agp-add-to-app
branch
from
July 29, 2026 20:22
f861ab5 to
82d9979
Compare
reidbaker-agent
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 29, 2026 20:43
45e5dea to
9ce1623
Compare
reidbaker-agent
force-pushed
the
agp-add-to-app
branch
from
July 29, 2026 20:44
82d9979 to
49bc8bd
Compare
reidbaker-agent
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 30, 2026 21:59
9ce1623 to
e34a92a
Compare
reidbaker-agent
force-pushed
the
agp-add-to-app
branch
from
July 30, 2026 21:59
49bc8bd to
645fe6f
Compare
reidbaker-agent
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 31, 2026 16:16
e34a92a to
b7a23f7
Compare
reidbaker-agent
force-pushed
the
agp-add-to-app
branch
from
July 31, 2026 16:16
645fe6f to
a4a3dbd
Compare
…ct cross-wiring Phase P7 of the AGP public-API migration (flutter#180137, flutter#166550), the last Kotlin consumer of the legacy variant API: - Add-to-app module (library) projects now use the same consolidated onVariants block as application projects: the Flutter compile task and CopyFlutterAssetsTask are registered lazily per library variant, and flutter_assets are wired through variant.sources.assets.addGeneratedSourceDirectory. The host application consumes them through AGP's normal library packaging and variant matching, with build modes resolved from the public Component.debuggable flag (so a custom debuggable host build type such as 'staging' still maps to the debug engine artifacts via the module's matched variant). Module variants skip the CLI task-name gating: which module variant a host build consumes is AGP's variant matching decision, and a module has at most three variants to configure lazily. - The host-project lookup, the appProject.afterEvaluate libraryVariants.all x applicationVariants.all cross-product, the explicit merge<HostVariant>Assets.dependsOn edge, and the addFlutterDepsForModule legacy fork from P5 are deleted. - flutter.hostAppProjectName is now a no-op: it only fed the host lookup. A warning explains that it has no effect and will be removed in a future Flutter release. - The legacy com.android.builder.model.BuildType buildModeFor overload lost its last caller and is deleted along with its duplicate tests (the P2 name/debuggable and DSL overload tests cover the semantics). FlutterPlugin.kt and FlutterPluginUtils.kt no longer import any legacy (non com.android.build.api) AGP types. Verification (CI): build_android_host_app_with_module_source, module_host_with_custom_build, module_custom_host_app_name scenarios; module-root flutter build apk; add-to-app newDsl=true test; gradle unit tests on both AGP axes. Revert-safe until P10 lands (mutually tolerant with P6).
reidbaker
force-pushed
the
agp-apk-copy-versioncode
branch
from
July 31, 2026 18:07
b7a23f7 to
53bcc7f
Compare
reidbaker
force-pushed
the
agp-add-to-app
branch
from
July 31, 2026 18:07
a4a3dbd to
447a829
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 8 of 11 of the AGP public-API migration; stacked on #7.
Phase P7 of the AGP public-API migration (flutter#180137,
flutter#166550), the last Kotlin consumer of the legacy variant
API:
onVariants block as application projects: the Flutter compile task
and CopyFlutterAssetsTask are registered lazily per library variant,
and flutter_assets are wired through
variant.sources.assets.addGeneratedSourceDirectory. The host
application consumes them through AGP's normal library packaging and
variant matching, with build modes resolved from the public
Component.debuggable flag (so a custom debuggable host build type
such as 'staging' still maps to the debug engine artifacts via the
module's matched variant). Module variants skip the CLI task-name
gating: which module variant a host build consumes is AGP's variant
matching decision, and a module has at most three variants to
configure lazily.
libraryVariants.all x applicationVariants.all cross-product, the
explicit merge<HostVariant>Assets.dependsOn edge, and the
addFlutterDepsForModule legacy fork from P5 are deleted.
lookup. A warning explains that it has no effect and will be removed
in a future Flutter release.
lost its last caller and is deleted along with its duplicate tests
(the P2 name/debuggable and DSL overload tests cover the semantics).
FlutterPlugin.kt and FlutterPluginUtils.kt no longer import any
legacy (non com.android.build.api) AGP types.
Verification (CI): build_android_host_app_with_module_source,
module_host_with_custom_build, module_custom_host_app_name scenarios;
module-root flutter build apk; add-to-app newDsl=true test; gradle unit
tests on both AGP axes.
Revert-safe until P10 lands (mutually tolerant with P6).
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).