Closed Bug 1513395 Opened 2 years ago Closed 2 years ago

Build fails because Google removed some libraries

Categories

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

defect

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: snorp, Assigned: agi)

References

Details

Attachments

(3 files)

[task 2018-12-11T22:16:33.348Z]  0:38.71 > Could not find com.android.tools.lint:lint:25.3.1.
[task 2018-12-11T22:16:33.348Z]  0:38.71   Searched in the following locations:
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/google/com/android/tools/lint/lint/25.3.1/lint-25.3.1.pom
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/google/com/android/tools/lint/lint/25.3.1/lint-25.3.1.jar
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/jcenter/com/android/tools/lint/lint/25.3.1/lint-25.3.1.pom
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/jcenter/com/android/tools/lint/lint/25.3.1/lint-25.3.1.jar
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/gradle-plugins/com/android/tools/lint/lint/25.3.1/lint-25.3.1.pom
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/gradle-plugins/com/android/tools/lint/lint/25.3.1/lint-25.3.1.jar
[task 2018-12-11T22:16:33.348Z]  0:38.71   Required by:
[task 2018-12-11T22:16:33.348Z]  0:38.71       project :annotations
[task 2018-12-11T22:16:33.348Z]  0:38.71 > Could not find com.android.tools.lint:lint-checks:25.3.1.
[task 2018-12-11T22:16:33.348Z]  0:38.71   Searched in the following locations:
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/google/com/android/tools/lint/lint-checks/25.3.1/lint-checks-25.3.1.pom
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/google/com/android/tools/lint/lint-checks/25.3.1/lint-checks-25.3.1.jar
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/jcenter/com/android/tools/lint/lint-checks/25.3.1/lint-checks-25.3.1.pom
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/jcenter/com/android/tools/lint/lint-checks/25.3.1/lint-checks-25.3.1.jar
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/gradle-plugins/com/android/tools/lint/lint-checks/25.3.1/lint-checks-25.3.1.pom
[task 2018-12-11T22:16:33.348Z]  0:38.71     - http://localhost:8081/nexus/content/repositories/gradle-plugins/com/android/tools/lint/lint-checks/25.3.1/lint-checks-25.3.1.jar
[task 2018-12-11T22:16:33.348Z]  0:38.71   Required by:
[task 2018-12-11T22:16:33.349Z]  0:38.71       project :annotations
Agi, we discussed bumping the version up to one that is still in the repo, right? Can you take this one?
Flags: needinfo?(agi)
Yep. Will send a patch today.
Assignee: nobody → agi
Flags: needinfo?(agi)
Severity: normal → blocker
Priority: -- → P1
OK so this ended up being a little trickier than I was expecting.

Updating lint and lint checks was straight-forward but it uncovered an unrelated issue in the build dependencies.

Looks like google still doesn't provide 'com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:2.1' on maven.google.com which is a dependency on 'org.robolectric:robolectric'.

The library is vendored on jcenter but the checksum is incorrect so our nexus repository refuses to use it, I opened a ticket on the android bug tracker: https://issuetracker.google.com/issues/120951637
Immediate work-around might be to fetch it manually and then produce a sha1 sum for it, and then bake it into a-g-d?  It's complicated to work-around.  Is there a dot release or anything that is well formed that we can force it to use with a module override?  What a mess.
This adds a task to each project called `downloadDependencies`. This task will
go through each configuration and resolve every dependency so that the gradle
cache contains a copy of every file needed for building and running tests. This
is intended to be used together with our nexus oss database but it can be used
locally too.

Note: `downloadDependencies` does not download dependencies added a runtime,
e.g. by plugins like apilint, checkstyle, findbugs... so we still need to run
those tasks to collect their dependencies.

This also vendors accessibility-test-framework which has recently been remove
by accident from the Google maven repository, this library can be removed once
https://issuetracker.google.com/issues/120951637 is resolved.

Depends on D14514
Blocks: 1502118
This adds a task to each project called `downloadDependencies`. This task will
go through each configuration and resolve every dependency so that the gradle
cache contains a copy of every file needed for building and running tests. This
is intended to be used together with our nexus oss database but it can be used
locally too.

Note: `downloadDependencies` does not download dependencies added a runtime,
e.g. by plugins like apilint, checkstyle, findbugs... so we still need to run
those tasks to collect their dependencies.

Depends on D14516
Attachment #9031317 - Attachment description: Bug 1513395 - Ask gradle to download all dependencies. r?nalexander! → Bug 1513395 - Vendor accessibility-test-framework in m-c. r=nalexander!
Attachment #9031315 - Attachment description: Bug 1513395 - Upgrade com.android.tools to 26.2.1. r?snorp! → Bug 1513395 - Upgrade com.android.tools to 26.2.1. r=snorp!
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf2b899cc4ac
Upgrade com.android.tools to 26.2.1. r=snorp,geckoview-reviewers
https://hg.mozilla.org/integration/autoland/rev/31bf1cd657a3
Vendor accessibility-test-framework in m-c. r=nalexander,geckoview-reviewers,snorp
https://hg.mozilla.org/integration/autoland/rev/468babe629d5
Ask gradle to download all dependencies. r=nalexander
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 66 → mozilla66
You need to log in before you can comment on or make changes to this bug.