mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() https://github.com/flutter/flutter/pull/151675 bumped module templates to AGP 8.1. In doing so, I tried to work around a behavior change [that was new in AGP 8.0](https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes): > AGP 8.0 creates no SoftwareComponent by default. Instead AGP creates SoftwareComponents only for variants that are configured to be published using the publishing DSL. by using AGP's publishing DSL to define which variants to publish in the module's ephemeral gradle files: ``` android.buildTypes.all {buildType -> if (!android.productFlavors.isEmpty()) { android.productFlavors.all{productFlavor -> android.publishing.singleVariant(productFlavor.name + buildType.name.capitalize()) { withSourcesJar() withJavadocJar() } } } else { android.publishing.singleVariant(buildType.name) { withSourcesJar() withJavadocJar() } } } ``` The problem is that this doesn't get applied to the plugin projects used by the module, so if a module uses any plugin it breaks. This PR fixes that by applying similar logic, but to each project (not just the module's project). Tested manually with https://github.com/gmackall/GrayAddToApp, and also re-enabled an old test that tested this use case as a part of the PR. Fixes: https://github.com/flutter/flutter/issues/154371 |
||
---|---|---|
.. | ||
deferred_component | ||
gradle | ||
host_app_common/app.tmpl | ||
host_app_editable | ||
host_app_ephemeral | ||
library_new_embedding |