Skip to content

Backported: Improve init gradle wrapper release#1056

Merged
jacopoc merged 3 commits into
apache:release24.09from
jacopoc:improve-init-gradle-wrapper-release
Apr 4, 2026
Merged

Backported: Improve init gradle wrapper release#1056
jacopoc merged 3 commits into
apache:release24.09from
jacopoc:improve-init-gradle-wrapper-release

Conversation

@jacopoc

@jacopoc jacopoc commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

jacopoc added 3 commits April 4, 2026 08:42
…he init-gradle-wrapper scripts to download and verify the version specified in gradle-wrapper.properties

This change simplifies gradlew upgrades (no longer requiring updates to the scripts or recomputation of file hashes) and improves repository quality by removing the binary file (gradle-wrapper.jar). The behavior of init-gradle-wrapper.sh and init-gradle-wrapper.ps1 is now consistent.

The init-gradle-wrapper.sh and init-gradle-wrapper.ps1 scripts now:

* download only gradle-wrapper.jar
* parse the version from gradle-wrapper.properties (no hardcoded version in the scripts)
* fetch the SHA-256 from services.gradle.org and verify it
* correctly detect when the JAR already exists and fetch SHA, warn-and-continue if unreachable, exit if match, re-download if mismatch
* accept arguments:
** --help: prints usage + full upgrade workflow, then exits
** --upgrade: sets a flag that triggers "./gradlew wrapper" at both success exit points (jar-already-valid and freshly-downloaded-and-verified)
** unknown arguments produce an error with a pointer to --help

(cherry picked from commit c8c8bca)
… unnecessary sed command

(cherry picked from commit 7a143d4)
@jacopoc jacopoc merged commit 539dfa8 into apache:release24.09 Apr 4, 2026
5 checks passed
@jacopoc jacopoc deleted the improve-init-gradle-wrapper-release branch April 4, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant