Files

2.2 KiB
Raw Permalink Blame History

Gradle Wrapper

This directory contains the Gradle wrapper files for the Apache Kafka project.

Upgrading Gradle version

When upgrading the Gradle version used by the Kafka project, update the following files in order:

  1. Update Gradle version in gradle/dependencies.gradle:

    gradle: "9.2.0"
    
  2. You may have to update the wrapper JAR commit and checksum in wrapper.gradle:

    task bootstrapWrapper() {
        // ... (other code)
        doLast {
            // ... (other code)
            String wrapperJarCommit = "<gradle-commit-sha>"
            String wrapperChecksum = "<wrapper-jar-sha256-checksum>"
            // ...
        }
    }
    
    • Verify the wrapper JAR at the commit matches the checksum:
    curl -sL https://raw.githubusercontent.com/gradle/gradle/<gradle-commit-sha>/gradle/wrapper/gradle-wrapper.jar | sha256sum
    
  3. Regenerate the gradle/wrapper/gradle-wrapper.properties and the wrapper script:

    • Find the Binary-only (-bin) ZIP Checksum for the binary distribution at https://gradle.org/release-checksums/

      ./gradlew wrapper --gradle-version <gradle-version> \
      --distribution-type bin \
      --gradle-distribution-sha256-sum <binary-distribution-checksum>
      

After upgrading, verify the Gradle version:

./gradlew --version