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
--- 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