This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a18384b3111 KAFKA-19756 Add documentation for Gradle version upgrade 
process (#20741)
a18384b3111 is described below

commit a18384b31112bfb38816402e89b8e7eafd13e402
Author: Chih-Yuan Chien <[email protected]>
AuthorDate: Wed Nov 19 18:26:25 2025 +0800

    KAFKA-19756 Add documentation for Gradle version upgrade process (#20741)
    
    Currently, there is no documentation describing how to upgrade Gradle in
    the Kafka project. The upgrade process involves   updating three
    separate configuration files with specific checksums and URLs, which can
    be error-prone without clear guidance.
    
    - Added a new "Upgrading Gradle version" section to README.md
    - Documents the 3-step process for upgrading Gradle:
      - Update Gradle version in gradle/dependencies.gradle
      - Update wrapper JAR checksum in wrapper.gradle
      - Regenerate the `gradle-wrapper.properties` and  the wrapper script
    
    Reviewers: Ken Huang <[email protected]>, PoAn Yang
     <[email protected]>, Ming-Yen Chung <[email protected]>, Chia-Ping
     Tsai <[email protected]>
---
 README.md                |  4 ++++
 gradle/wrapper/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/README.md b/README.md
index 6e2f3bda784..49d1f9fd5cf 100644
--- a/README.md
+++ b/README.md
@@ -271,6 +271,10 @@ only safe if the Scala library version is the same at 
compile time and runtime.
 may depend on the kafka jar for integration tests where they may include a 
scala library with a different version), we don't enable it by
 default. See https://www.lightbend.com/blog/scala-inliner-optimizer for more 
details.
 
+### Upgrading Gradle version ###
+
+See [gradle/wrapper/README.md](gradle/wrapper/README.md) for instructions on 
upgrading the Gradle version.
+
 ### Running system tests ###
 
 See [tests/README.md](tests/README.md).
diff --git a/gradle/wrapper/README.md b/gradle/wrapper/README.md
new file mode 100644
index 00000000000..58efa8e7d0c
--- /dev/null
+++ b/gradle/wrapper/README.md
@@ -0,0 +1,42 @@
+# 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`:
+   ```groovy
+   gradle: "9.2.0"
+   ```
+
+2. **Update wrapper JAR checksum** in `wrapper.gradle`:
+   - Find the ***Wrapper JAR Checksum*** at 
https://gradle.org/release-checksums/
+   - Update the `wrapperChecksum` variable:
+   ```groovy
+   task bootstrapWrapper() {
+       // ... (other code)
+       doLast {
+           // ... (other code)
+           String wrapperChecksum = "<wrapper-jar-sha256-checksum>"
+           // ...
+       }
+   }
+   ```
+   - Verify the wrapper JAR URL is accessible at:
+     
`https://raw.githubusercontent.com/gradle/gradle/v<gradle-version>/gradle/wrapper/gradle-wrapper.jar`
+
+
+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/
+
+      ```shell
+      ./gradlew wrapper --gradle-version <gradle-version> \
+      --distribution-type bin \
+      --gradle-distribution-sha256-sum <binary-distribution-checksum>
+      ```
+
+After upgrading, verify the Gradle version:
+
+    ./gradlew --version

Reply via email to