Closed Bug 2043928 Opened 1 month ago Closed 29 days ago

Migrate Android Gradle builds off deprecated DSL blocks and the variantFilter API

Categories

(Firefox Build System :: Android Studio and Gradle Integration, task)

task

Tracking

(firefox153 fixed)

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: RyanVM, Assigned: RyanVM)

References

Details

Attachments

(1 file)

AGP 9 removes the packagingOptions, lintOptions, and aaptOptions DSL blocks and the variantFilter API. As preparatory work for the AGP 9 upgrade (bug 2043921), rename the blocks to their supported equivalents (packaging, lint, androidResources) across the Android Gradle builds (android-components, Fenix, Focus, GeckoView, and the example/test-runner apps), switch the android-components buildTypes.all iterator to the lazy configureEach, and migrate the android-components browser sample's variantFilter to androidComponents.beforeVariants.

All of these APIs are already valid on the current AGP 8.13, so this can land and ship independently of the AGP version bump. Fenix and Focus each had both a packagingOptions and a packaging block; these are now merged into one.

Try: https://treeherder.mozilla.org/jobs?repo=try&revision=6de8fc758ae1d94b60207a2324989d11b4f43ad8

AGP 9 removes the packagingOptions, lintOptions, and aaptOptions DSL blocks and the variantFilter API.
Rename the blocks to their supported equivalents (packaging, lint, androidResources) and migrate the
android-components browser sample's variantFilter to androidComponents.beforeVariants; all of these are
already valid on the current AGP 8.13. Also switch the android-components buildTypes.all iterator to the
lazy configureEach and the Fenix benchmark module's beforeVariants block from the removed
VariantBuilder.enabled to enable. Fenix and Focus each had both a packagingOptions and a packaging block;
these are merged into one.

Pushed by rvandermeulen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/99cb89ff067d https://hg.mozilla.org/integration/autoland/rev/4f5603049ae2 Replace deprecated AGP DSL blocks and the variantFilter API ahead of AGP 9 r=ahochheiden,android-reviewers,geckoview-reviewers,jonalmeida
Status: NEW → RESOLVED
Closed: 29 days ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: