mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-07-22 07:48:27 +00:00
Claude Code Web routes github.com through a git-only proxy, so the Gradle wrapper's distributionUrl (services.gradle.org, which 307-redirects to a github.com release asset) can't bootstrap — it 403s even at Full network access, and `./gradlew` fails before running any task. Seed the pinned distribution in the existing web-only SessionStart hook, reusing the same idempotent curl-download pattern already used there for the Android SDK and Kotlin/Native deps: skip if already installed, else fetch Gradle's OFFICIAL sha256 (served from services.gradle.org, reachable here), download the zip from a mirror, and verify before extracting so a tampered or wrong mirror file is rejected and never executed. The wrapper cache dir is derived as base36(md5(distributionUrl)) so it survives version bumps. Also pin distributionSha256Sum in gradle-wrapper.properties as defense in depth: Gradle then verifies any distribution it installs (mirror-seeded, CI, or local) against the known-good hash. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A7bocRTSPyXwz6zVMzDbKR