Skip to content

chore(build): upgrade Gradle wrapper to 9.7.1 and retry distribution downloads - #188

Open
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:chore/gradle-9.7.1
Open

chore(build): upgrade Gradle wrapper to 9.7.1 and retry distribution downloads#188
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:chore/gradle-9.7.1

Conversation

@adityamparikh

Copy link
Copy Markdown
Contributor

What

Upgrades the Gradle wrapper from 9.4.1 → 9.7.1 and sets retries=3 for 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 in gradle/libs.versions.toml names one, since CI invokes ./gradlew. So gradle-wrapper.properties is the single source of truth.

About retries=3

The 9.7.1 generator emits two properties that did not exist in 9.4.1's output:

retries=3          # generated default is 0
retryBackOffMs=500

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 default retries=0 means one attempt and then fail, which turns a transient blip fetching services.gradle.org into 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=10000 is 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 0 would keep the file byte-identical to what gradle wrapper produces, at the cost of that resilience.

Verification

Full ./gradlew build on JDK 25:

BUILD SUCCESSFUL
:rat, :spotlessJavaCheck, :test, :check all executed (not up-to-date)
372 tests · 0 failures · 0 errors · 7 skipped

Gradle's embedded Kotlin moves 2.x → 2.4.0, which is the notable compatibility surface here since buildSrc uses kotlin-dsl and 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) — and grep over build.gradle.kts and buildSrc/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

…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>
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