chia7712 commented on code in PR #20658:
URL: https://github.com/apache/kafka/pull/20658#discussion_r2419187021
##########
wrapper.gradle:
##########
@@ -42,9 +42,11 @@ task bootstrapWrapper() {
// fetch the jar.
def wrapperBaseUrl =
"https://raw.githubusercontent.com/gradle/gradle/v$versions.gradle/gradle/wrapper"
def wrapperJarUrl = wrapperBaseUrl + "/gradle-wrapper.jar"
+ def wrapperJarChecksumUrl =
"https://services.gradle.org/distributions/gradle-$versions.gradle-wrapper.jar.sha256"
def bootstrapString = """
# Loop in case we encounter an error.
+ REQUIRED_WRAPPER_JAR_CHECKSUM=\$(curl -sSL "$wrapperJarChecksumUrl")
Review Comment:
Could you please hardcode the sha?
##########
wrapper.gradle:
##########
@@ -53,6 +55,24 @@ task bootstrapWrapper() {
sleep 5
continue
fi
+ else
+ # Verify checksum of existing wrapper JAR.
Review Comment:
Please add comments explaining the reason for adding this mechanism
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]