Improved: Remove gradle-wrapper.jar from the repository and enhance the init-gradle-wrapper scripts to download and verify the version specified in gradle-wrapper.properties#1055
Merged
Conversation
…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
… unnecessary sed command
Contributor
|
I'll review and especially test, maybe today, else tmrw. |
Contributor
|
OK, as I supposed, I'm definitely blocked. Windows 7 supports only Gradle 8.11 and npm 13.14.0. BTW, I got another issue on Ubuntu 20.04 related to node in example. Cloning both repos fixed it. |
Contributor
|
I let you handling #1052 ? |
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.
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:
** --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