mingyen066 opened a new pull request, #21026:
URL: https://github.com/apache/kafka/pull/21026

   * Use Gradle’s Java toolchains to enable building with Java 25.
     * Why not just upgrade Gradle? To run Gradle scripts with JDK 25, Gradle 
9.1+ is required. However, Kafka 3.9 must support JDK 8 (maximum supported 
Gradle version is 8.14), so upgrading Gradle is not feasible.
   * SpotBugs has not been updated yet because only version 4.9.7 and above 
supports Java 25.
     * Fixing SpotBugs will require changing all usages of 
JavaVersion.current() (because it returns the version of the Gradle JVM).
     * Reference: https://github.com/spotbugs/spotbugs/issues/3564
   * Scala 2.12.x currently does not support Java 25; support will be available 
in 2.12.21, expected to be released before the end of December.
   
   * Upgrade Scala 2.13.15 → 2.13.18, instead of trunk 2.13.17. because using 
2.13.17 causes false errors:
   > Task :core:compileTestScala
   [Error] 
/Users/ming/code/kafka/core/src/test/scala/unit/kafka/security/authorizer/AuthorizerTest.scala:63:21:
 private val KRAFT in class AuthorizerTest is never used
   one error found
   
   This happens because the annotation usage is not detected: 
@ValueSource(strings = Array(KRAFT, ZK)).
   
   Usage:
   ```
   > sdk use java 23.0.2-tem  
   Using java version 23.0.2-tem in this shell.
   
   > ./gradlew clean -PjavaToolChainVersion=25 build -x test -x spotbugsMain -x 
spotbugsTest
   ```


-- 
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]

Reply via email to