Skip to content

Retry transient Gradle wrapper downloads - #826

Merged
amyu merged 2 commits into
mainfrom
codex/retry-gradle-download
Aug 13, 2026
Merged

Retry transient Gradle wrapper downloads#826
amyu merged 2 commits into
mainfrom
codex/retry-gradle-download

Conversation

@amyu

@amyu amyu commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • enable Gradle Wrapper distribution download retries
  • retry up to five times with exponential backoff starting at five seconds
  • keep build and test failures outside the retry scope

Why

CI occasionally fails while downloading the Gradle distribution from services.gradle.org with transient errors such as Unexpected end of file from server and HTTP 503 responses. The Wrapper configuration currently disables its built-in download retry support.

Using the Wrapper's native retry settings applies consistently to Linux, Windows, and macOS without duplicating retry scripts across workflow jobs. The five-second initial delay doubles after each failed attempt, avoiding rapid repeated requests during a longer service interruption.

Validation

  • ran ./sample-android-project/gradlew -p sample-android-project --version
  • confirmed Gradle 9.6.1 loads the updated Wrapper configuration
  • observed the Wrapper retrying distribution downloads in GitHub Actions
  • git diff --check

@amyu
amyu marked this pull request as ready for review August 13, 2026 02:16
@amyu
amyu merged commit a1c6b78 into main Aug 13, 2026
40 checks passed
@amyu
amyu deleted the codex/retry-gradle-download branch August 13, 2026 02:16
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