Files
Ryan VanderMeulen 5704fb79a3 Bug 2059955 - Check that the packaged Gradle dependency cache is complete. r=ahochheiden
This task has intermittently produced artifacts with files missing, which only surfaces much later as a
confusing resolution failure in a task that fetched it. The existing check watches a single hardcoded
artifact as a canary.

Check all of it instead. Each enumeration pass leaves behind an inventory of every artifact Gradle
resolved, with a sha256 for each, so verify the packaged repositories against those. The passes resolve
either through the local Nexus or from a repository that is packaged as it stands, so anything else absent,
or any component packaged with one of its files missing or damaged, is a fault and fails the task before it
pays to compress the artifact. The three are reported apart, since what to do about a component that was
never packaged is not what to do about one that was packaged incompletely.

Two wrinkles. Downstream tasks are handed every packaged repository, so an artifact only has to appear in
one of them. And a component's module metadata can name a file that a different module publishes: Gradle
records guava's -jre jar under its -android component, and Kotlin Multiplatform modules redirect to a
platform-specific module. Where the recorded name isn't where the component's coordinates point, look for
its checksum elsewhere in the packaged tree.

GeckoView is exempt: this task builds it and publishes it to a local Maven repository that the standalone
passes resolve it from, so it is deliberately not packaged.

Only those three fail the task, because only those three become a resolution failure in a task that fetched
the archive. An inventory that contradicts itself, or an entry too malformed to check, is reported as a
warning instead: the archive still works, and a red toolchain task would cost more than it tells anyone.

Differential Revision: https://phabricator.services.mozilla.com/D315812
2026-08-05 04:17:43 +00:00
..