Closed
Bug 1255914
Opened 9 years ago
Closed 8 years ago
Build release configurations and Proguard (minify) Gradle builds
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Firefox Build System
Android Studio and Gradle Integration
Tracking
(firefox53 fixed)
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: nalexander, Assigned: nalexander)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Right now, we build debug automation: https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/Makefile.in#214.
This ticket tracks changing that to release automation; enabling Proguard (minify) on those configurations; and verifying that the Proguard passes aren't breaking our local builds or our test configurations.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
mcomella: I have patches on try for this. I'll attempt to post the latest from my tree shortly; I'm not aware of significant changes here.
Assignee | ||
Comment 4•8 years ago
|
||
I think this is already working, see https://dxr.mozilla.org/mozilla-central/source/mobile/android/app/build.gradle#44. I'll re-open if we're actually busted.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•8 years ago
|
||
We're busted. We build debug in --with-gradle: https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/Makefile.in#238.
The trick to making this work is keeping our bonkers Robocop, which runs against a Proguarded APK. We can either try to make Gradle produce a debug test APK that runs against a release Fennec APK, or we can make the debug APK _be_ a release Fennec APK. I think the latter is probably easier; I'll investigate.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•8 years ago
|
||
> ... or we can make the debug APK _be_ a release Fennec APK. I think the latter is probably easier; I'll
> investigate.
A little more context: the Android Gradle plugin automatically produces a "debugAndroidTest" but no "releaseAndroidTest". The androidTest configuration is what makes the test APK (which we rename to robocop.apk); it seems harder to coerce a "releaseAndroidTest" than to make the "debugAutomation" configuration just _be_ release.
Assignee | ||
Comment 7•8 years ago
|
||
--with-gradle, without Proguard:
Size of classes.dex: 7525520 bytes
Size of fennec-52.0a1.en-US.android-arm.apk: 32251279 bytes
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8a39a0b7a09288e656b1d26dc252ad1c923ac960&selectedJob=30973164
--with-gradle, with Proguard
Size of classes.dex: 7359360 bytes
Size of fennec-52.0a1.en-US.android-arm.apk: 32164904 bytes
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a425cf4d7daabf5f5d90dc799f3c1bdc84ef3f44&selectedJob=30973001
Without Gradle, with Proguard
Size of classes.dex: 6885456 bytes
Size of fennec-52.0a1.en-US.android-arm.apk: 31803028 bytes
https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&selectedJob=39132592
So that's a difference in APK size of (- 31803028 32164904) = 361876. I comment on the difference in classes.dex in the commit message.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8812474 [details]
Bug 1255914 - Part 1: Proguard (minify) Gradle builds in automation.
https://reviewboard.mozilla.org/r/94210/#review94554
::: mobile/android/app/build.gradle:70
(Diff revision 1)
> proguardFile "${topsrcdir}/mobile/android/config/proguard/proguard.cfg"
> }
> + release configureMinifyClosure
> + if (mozconfig.substs.MOZILLA_OFFICIAL) {
> + debug configureMinifyClosure
> + }
nit: trailing whitespaces
Attachment #8812474 -
Flags: review?(s.kaspari) → review+
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8812475 [details]
Bug 1255914 - Part 2: mostly back out multiDex (changeset 6972bef6693c).
https://reviewboard.mozilla.org/r/94212/#review94556
Nice!
Attachment #8812475 -
Flags: review?(s.kaspari) → review+
Updated•8 years ago
|
Assignee: nobody → nalexander
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 14•8 years ago
|
||
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61e649e690c9
Part 1: Proguard (minify) Gradle builds in automation. r=sebastian
https://hg.mozilla.org/integration/autoland/rev/a776c56e2ac7
Part 2: mostly back out multiDex (changeset 6972bef6693c). r=sebastian
Comment 15•8 years ago
|
||
backout bugherder |
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Comment 16•8 years ago
|
||
bugherder |
Assignee | ||
Updated•7 years ago
|
No longer blocks: gradle-automation
Assignee | ||
Updated•7 years ago
|
Blocks: gradle-automation-v2
Updated•5 years ago
|
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 53 → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•