Closed Bug 1667675 Opened 2 months ago Closed 2 months ago

sources.jar doesn't contain source code

Categories

(GeckoView :: General, defect, P3)

Tracking

(firefox83 fixed)

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: greenrecyclebin, Assigned: greenrecyclebin)

Details

Attachments

(2 files)

Reproducible steps:

  • Build "Firefox for Android"
    $ (cd mobile/android/geckoview && ../../../gradlew clean)
    $ ./mach android archive-geckoview
    

Expected behavior:

  • sources.jar files are not empty:
    $ find . -name '*geckoview*sources.jar' -exec sh -c 'jar tf "$0" | wc -l' {} \;
        874
        874
    

Actual behavior:

  • sources.jar files are empty:
    $ find . -name '*geckoview*sources.jar' -exec sh -c 'jar tf "$0" | wc -l' {} \;
        2
        2
    

I suspect https://hg.mozilla.org/mozilla-central/rev/38ac0df00f7b3d5c787a3cb5e02c5d3a366809ec caused this regression.
sources.jar has the right content in
https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview/69.0.20190903125908/, but no longer does starting from https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview/70.0.20191022130254/.
Documentation is lacking but apparently variant.javaCompileProvider.get().source is always empty according to https://github.com/bumptech/glide/commit/da34aabdb625b6bfb2b981939283d1f846b1e354.
In that commit, android.sourceSets.main.java.srcDirs was the replacement. However, I used variant.sourceSets.collect({ it.java.srcDirs }).flatten() to be consistent with an earlier usage in build.gradle.

Flags: needinfo?(agi)
Assignee: nobody → agi
Flags: needinfo?(agi)
Priority: -- → P3
Severity: -- → S3

Ah I just noticed you attached a patch, Daniel would you like to create an account and submit it on Phabricator? https://phabricator.services.mozilla.com/

guide here: https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html

Flags: needinfo?(greenrecyclebin)

Documentation is lacking but apparently
variant.javaCompileProvider.get().source is always empty according to
https://github.com/bumptech/glide/commit/da34aabdb625b6bfb2b981939283d1f846b1e354.

In that commit, android.sourceSets.main.java.srcDirs was the
replacement. However, I used
variant.sourceSets.collect({ it.java.srcDirs }).flatten() to be
consistent with an earlier usage in build.gradle.

Assignee: agi → greenrecyclebin
Status: NEW → ASSIGNED
Flags: needinfo?(greenrecyclebin)
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d4f03a4ffe2
Use sourceSets instead of JavaCompileProvider to generate sources.jar. r=agi
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.