Skip to content

Pin checksums of IDE source jars - #175

Merged
SamiPr0 merged 3 commits into
mainfrom
worktree-trust-ide-sources
Oct 31, 2026
Merged

SamiPr0 merged 3 commits into
mainfrom
worktree-trust-ide-sources

Conversation

@SamiPr0

@SamiPr0 SamiPr0 commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Problem

Android Studio sync downloads *-sources.jar for every plugin and library on the build classpath, plus gradle-9.8.1-src.zip, through a detached configuration (:app:detachedConfiguration2). None had a checksum in gradle/verification-metadata.xml, so every sync failed with 113+ verification errors and the IDE could not load the project.

Change

Source jars stay verified. gradle/verification-metadata.xml gains sha256 entries for them (additions only, no existing entry changed):

  • Generated with --write-verification-metadata sha256 while resolving every module's SourcesArtifact (buildscript classpath: 114 sources, :app: 454).
  • gradle-9.8.1-src.zip uses the checksum Gradle publishes at services.gradle.org/distributions/gradle-9.8.1-src.zip.sha256. I did not download the zip to compare, so a wrong value fails verification when the IDE fetches it.
  • An earlier commit trusted sources without a checksum; it is reverted on this branch.

Verification

  • Re-resolving all sources in normal (non-write) mode passes; it failed on main.
  • Modules with no published sources jar (38) need no entry.
  • Not regenerated with an empty Gradle cache (AGENTS.md); only source jars were added, existing entries untouched. Please sanity check the diff.

🤖 Generated with Claude Code

SamiPr0 and others added 3 commits October 31, 2026 11:59
Android Studio sync downloads *-sources.jar and gradle-*-src.zip for code
navigation, through a detached configuration. None are listed in
verification-metadata.xml, so every sync failed with 113 verification
errors and the IDE could not load the project.

Trust only those two file patterns. Sources never reach a build
classpath; binary jars and POMs stay fully verified.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Android Studio sync downloads *-sources.jar for every plugin and
library on the build classpath, plus gradle-9.8.1-src.zip, through a
detached configuration. None had a checksum, so each sync failed with
113+ verification errors.

Add sha256 entries for the source jars, generated by resolving each
module's SourcesArtifact with --write-verification-metadata. Only
additions; no existing entry changed. The Gradle src.zip uses the
checksum Gradle publishes on services.gradle.org.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@SamiPr0 SamiPr0 changed the title Trust IDE source jars in dependency verification Pin checksums of IDE source jars Oct 31, 2026
@sonarqubecloud

Copy link
Copy Markdown

@SamiPr0
SamiPr0 merged commit ec80f48 into main Oct 31, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant