Closed Bug 1428128 Opened 2 years ago Closed 2 years ago

omni.ja is stored compressed in local Gradle build

Categories

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

All
Android
defect
Not set

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: JanH, Assigned: JanH)

References

Details

Attachments

(1 file)

This happens when building completely via Gradle, e.g. via ./mach gradle clean app:assembleLocalPhotonDebug or Android Studio as opposed to using ./mach build && ./mach package, which is why our automation builds are unaffected as far as I can tell.

The effect of this is that accessing omni.ja resources from Java via the GeckoJarReader fails. One noticeable effect is that the favicon for about:home tabs is missing.
(In reply to Jan Henning [:JanH] from comment #0)
> This happens when building completely via Gradle, e.g. via ./mach gradle
> clean app:assembleLocalPhotonDebug or Android Studio as opposed to using
> ./mach build && ./mach package, which is why our automation builds are
> unaffected as far as I can tell.
> 
> The effect of this is that accessing omni.ja resources from Java via the
> GeckoJarReader fails. One noticeable effect is that the favicon for
> about:home tabs is missing.

Good catch, JanH!  You're correct that |mach package| has special code to handle this.  I really doubt it's worth trying to address this for local Gradle builds, since the ZIP operation is handled deep in Android-Gradle plugin land... and yet I see a patch!
Comment on attachment 8939919 [details]
Bug 1428128 - Store omni.ja uncompressed when packaging via Gradle.

https://reviewboard.mozilla.org/r/210210/#review215936

Thanks, JanH!

::: commit-message-796c2:1
(Diff revision 1)
> +Bug 1428128 - Store omni.ja uncompressed when packaging via Gradle, too. r?nalexander

nit: drop the "too".

::: mobile/android/app/build.gradle:30
(Diff revision 1)
>          buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\""
>  
>          vectorDrawables.useSupportLibrary = true
>      }
>  
> +    aaptOptions {

A comment such as

```
// Gecko expects the omnijar to be STORED rather than DEFLATED.
```

would be nice.
Attachment #8939919 - Flags: review?(nalexander) → review+
This shouldn't affect automation builds anyway, but as a sanity check the build from the try run looks okay and seems to run, so this should be good to go
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/autoland/rev/c0eeabce1fd8
Store omni.ja uncompressed when packaging via Gradle. r=nalexander
Duplicate of this bug: 1416946
https://hg.mozilla.org/mozilla-central/rev/c0eeabce1fd8
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 59 → mozilla59
You need to log in before you can comment on or make changes to this bug.