-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Upgrade module template AGP version #151675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I think build variants is supported for modules which means that this feature wont work for people who have custom variants. I think you are going to need to write some dynamic code to handle other variants. (blog post for apps) |
reidbaker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Show that custom variants work before merging.
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
I'm not actually sure that modules support flavors, because:
But I think also this new change would support them anyways, though it's kind of hacky |
|
@reidbaker This should be ready for review again fyi |
flutter/flutter@9b84701...814e49b 2024-08-12 [email protected] Upgrade module template AGP version (flutter/flutter#151675) 2024-08-12 [email protected] Roll Flutter Engine from 5fea110c3b20 to bcf2dcc09a13 (2 revisions) (flutter/flutter#153295) 2024-08-12 [email protected] Roll Packages from f7b1256 to d9a6de8 (9 revisions) (flutter/flutter#153291) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
#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: #154371
Follow up to #151433.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.