jim0987795064 commented on code in PR #24243: URL: https://github.com/apache/kafka/pull/24243#discussion_r4641082855
########## wrapper.gradle: ########## @@ -18,34 +18,83 @@ */ // This file contains tasks for the gradle wrapper generation. - -// Ensure the wrapper script is generated based on the version defined in the project -// and not the version installed on the machine running the task. +// +// To upgrade Gradle, run: +// ./gradlew wrapper --gradle-version <version> +// The published distribution checksum, the published wrapper jar checksum and the gradle/gradle commit to +// fetch the wrapper jar from are looked up automatically and written into gradle/wrapper/gradle-wrapper.properties +// and gradlew. // Read more about the wrapper here: https://docs.gradle.org/current/userguide/gradle_wrapper.html -wrapper { - gradleVersion = versions.gradle + +import groovy.json.JsonSlurper +import java.security.MessageDigest + +def fetchBytes = { String url -> + HttpURLConnection conn = (HttpURLConnection) URI.create(url).toURL().openConnection() + conn.connectTimeout = 15_000 + conn.readTimeout = 60_000 + conn.setRequestProperty("User-Agent", "apache-kafka-build") + def token = System.getenv("GITHUB_TOKEN") + if (token && url.startsWith("https://api.github.com/")) { + conn.setRequestProperty("Authorization", "Bearer $token") + } Review Comment: Thanks for the suggestion. I've removed the token and had the same results as yours. -- 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]
