Closed Bug 1208120 Opened 9 years ago Closed 6 years ago

Move Android Proguard build rules to moz.build

Categories

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

defect
Not set
normal

Tracking

(firefox44 affected)

RESOLVED WONTFIX
Tracking Status
firefox44 --- affected

People

(Reporter: nalexander, Unassigned)

References

(Blocks 1 open bug)

Details

Right now we have a single Proguard consumer, ad-hoc in mobile/android/base/Makefile.in.  It defines a two-phase Proguard optimization process.  The first phase strips debug information from library JARs; the second phase does the actual optimization (with a variable number of passes).  Each phase utilizes different Proguard .cfg files.

We'd like to simplify the Fennec build, and expose Proguard to the b2gdroid build.

This ticket tracks extracting the relevant moz.build definitions and pushing the Make rules into java-build.mk.

Bug 709230 added the main phase.  Bug 1106593 added the stripping phase.  Bug 1093218 is relevant.
I propose the following simple ontology:

ANDROID_PROGUARD_JARS = [Path] (maps to -injars)
ANDROID_PROGUARD_LIBRARY_JARS = [Path] (maps to -libraryjars)
ANDROID_PROGUARD_PASSES = Integer (maps to -optimizationpasses)
ANDROID_PROGUARD_CFGS = [Path] (maps to @ arguments)

The library stripping .cfg is not Fennec specific, so we can extract it to a central place and use it for Fennec and b2gdroid.

The tricky things here:
* the two phases;
* multiple inputs mapping to multiple outputs;
* (optional) allowing multiple PG invocations (with ANDROID_PROGUARD_TARGETS or similar).
Summary: Move Proguard build rules to moz.build → Move Android Proguard build rules to moz.build
We're not going to do this; Proguard is handled by Gradle, and --without-gradle is going to die soon: Bug 1414415.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox Build System
You need to log in before you can comment on or make changes to this bug.