Closed Bug 2043929 Opened 1 month ago Closed 29 days ago

Migrate Fenix version codes and BuildConfig off the legacy AGP variant 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 applicationVariants API that Fenix uses to set per-output version codes/names and per-variant BuildConfig fields. As preparatory work for the AGP 9 upgrade (bug 2043921), move the version code and name overrides to androidComponents.onVariants (reading the ABI from output.filters), and relocate the BuildConfig field definitions onto defaultConfig, with the debug build type overriding the fields that differ. The coverage jacoco report wiring also moves to onVariants.

The new APIs are already valid on AGP 8.13. The generated BuildConfig.java and per-channel version codes are preserved (verified byte-identical for debug/nightly and on a try push for the per-ABI splits).

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

AGP 9 removes the applicationVariants API. Move the per-output version code and name overrides to
androidComponents.onVariants, and relocate the BuildConfig field definitions onto defaultConfig (with the
debug build type overriding the ones that differ), which keeps the raw-literal buildConfigField API and
preserves the generated values. The coverage jacoco report wiring also moves to onVariants.

Pushed by rvandermeulen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7cd767b69829 https://hg.mozilla.org/integration/autoland/rev/9ce668fa3f14 Migrate Fenix version codes and BuildConfig off the legacy AGP variant API r=ahochheiden,android-reviewers,adhingra
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: