chore(build): upgrade Gradle wrapper to 9.7.1 and retry distribution downloads - #188
Open
adityamparikh wants to merge 1 commit into
Open
chore(build): upgrade Gradle wrapper to 9.7.1 and retry distribution downloads#188adityamparikh wants to merge 1 commit into
adityamparikh wants to merge 1 commit into
Conversation
…downloads Bumps the Gradle wrapper from 9.4.1 to 9.7.1, generated with `./gradlew wrapper --gradle-version 9.7.1 --distribution-type bin` (run twice, so the wrapper jar is regenerated by 9.7.1 itself rather than left at the 9.4.1 copy). Nothing outside the wrapper pins a Gradle version -- no workflow in .github/ and no entry in gradle/libs.versions.toml names one, since CI invokes ./gradlew -- so gradle-wrapper.properties is the single source of truth and this is the whole change. The 9.7.1 generator emits two properties that did not exist in 9.4.1 output, `retries` and `retryBackOffMs`. They govern retrying the download of the Gradle distribution itself, which happens before Gradle exists locally and is therefore not reachable from build.gradle.kts. The generated default is `retries=0` (one attempt, then fail); this commit sets `retries=3` so a transient failure fetching services.gradle.org surfaces as a retry rather than as a red build. `networkTimeout` is a separate knob -- it bounds a single attempt and does not retry. Verified with a full `./gradlew build` on JDK 25: BUILD SUCCESSFUL, with :rat, :spotlessJavaCheck, :test and :check all executed -- 372 tests, 0 failures, 0 errors, 7 skipped. One note for the future: the build now reports a Gradle 10 incompatibility, but it resolves to a single deprecated call, ReportingExtension.file(String), which is made by a third-party plugin and not by build.gradle.kts or buildSrc. It will clear on a plugin bump; no build-script change is needed here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Upgrades the Gradle wrapper from 9.4.1 → 9.7.1 and sets
retries=3for distribution downloads.Generated with
./gradlew wrapper --gradle-version 9.7.1 --distribution-type bin, run twice so the wrapper jar is regenerated by 9.7.1 itself rather than left as the 9.4.1 copy.Why this is the whole change
Nothing outside the wrapper pins a Gradle version — no workflow under
.github/and no entry ingradle/libs.versions.tomlnames one, since CI invokes./gradlew. Sogradle-wrapper.propertiesis the single source of truth.About
retries=3The 9.7.1 generator emits two properties that did not exist in 9.4.1's output:
These govern retrying the download of the Gradle distribution itself. That happens before Gradle exists locally, so it is not reachable from
build.gradle.kts. The generated defaultretries=0means one attempt and then fail, which turns a transient blip fetchingservices.gradle.orginto a red build rather than a retry — expensive on this project, where fork PRs sit in an approval-gated CI queue and a re-run is not cheap.networkTimeout=10000is a separate knob: it bounds a single attempt, it does not retry.This is the one deliberate deviation from generated output. Setting it back to
0would keep the file byte-identical to whatgradle wrapperproduces, at the cost of that resilience.Verification
Full
./gradlew buildon JDK 25:Gradle's embedded Kotlin moves 2.x → 2.4.0, which is the notable compatibility surface here since
buildSrcuseskotlin-dsland its convention plugins recompile against it. They compile clean.Note for later (no action in this PR)
The build now reports "incompatible with Gradle 10". That resolves to exactly one deprecated call —
ReportingExtension.file(String)— andgrepoverbuild.gradle.ktsandbuildSrc/src/main/kotlin/finds no such call in this repo's own scripts. It comes from a third-party plugin and will clear on a plugin bump; no build-script change is needed here.🤖 Generated with Claude Code