Bug 1428128 - Store omni.ja uncompressed when packaging via Gradle. r=nalexander
authorJan Henning <jh+bugzilla@buttercookie.de>
Thu, 04 Jan 2018 19:48:43 +0100
changeset 449621 c0eeabce1fd89e90d19d4d7df9c02a8efd0fca93
parent 449620 fcec2e929c2ca950a5cca97d3d8d308fa12e4213
child 449622 fc62f3ae1ab2f85056f0710b90a65afba22f4fb4
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1428128
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1428128 - Store omni.ja uncompressed when packaging via Gradle. r=nalexander - We already do this when packaging conventionally via ./mach package - The omnijar is itself already a compressed archive, so no need to compress it again - Gecko (especially the GeckoJarReader) expects the file to be STORED within the APK, doing otherwise may cause read access to the omnijar to fail MozReview-Commit-ID: GcpeAehLe5h
mobile/android/app/build.gradle
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -22,16 +22,22 @@ android {
         testApplicationId 'org.mozilla.roboexample.test'
         testInstrumentationRunner 'org.mozilla.gecko.FennecInstrumentationTestRunner'
         // Used by Robolectric based tests; see TestRunner.
         buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\""
 
         vectorDrawables.useSupportLibrary = true
     }
 
+    aaptOptions {
+        // The omnijar is already a compressed file itself and Gecko expects it to be
+        // STORED within the APK rather than DEFLATED.
+        noCompress 'ja'
+    }
+
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_7
         targetCompatibility JavaVersion.VERSION_1_7
     }
 
     dexOptions {
         javaMaxHeapSize "2g"
         jumboMode = true