chia7712 commented on code in PR #17522:
URL: https://github.com/apache/kafka/pull/17522#discussion_r1845552291


##########
build.gradle:
##########
@@ -116,6 +116,13 @@ ext {
   configureJavaCompiler = { name, options ->
     // -parameters generates arguments with parameter names in 
TestInfo#getDisplayName.
     // ref: 
https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164
+
+    def modulesNeedingJava17 = [
+      ":core", ":coordinator-common", ":generator", ":group-coordinator",
+      ":metadata", ":raft", ":server", ":server-common", ":share", ":storage",
+      ":share-coordinator", ":test-common", ":tools", 
":transaction-coordinator"
+    ]
+
     if (name == "compileTestJava" || name == "compileTestScala") {
       options.compilerArgs << "-parameters"
       options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]

Review Comment:
   this need to be updated too.



##########
build.gradle:
##########
@@ -128,7 +135,11 @@ ext {
       options.compilerArgs << "-Xlint:-serial"
       options.compilerArgs << "-Xlint:-try"
       options.compilerArgs << "-Werror"
-      options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]
+      if (modulesNeedingJava17.any { project.path.startsWith(it) }) {
+        options.compilerArgs += ["--release", String.valueOf(17)]
+      } else {
+        options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]
+      }
     }

Review Comment:
   please update scala module as well



##########
build.gradle:
##########
@@ -128,7 +135,11 @@ ext {
       options.compilerArgs << "-Xlint:-serial"
       options.compilerArgs << "-Xlint:-try"
       options.compilerArgs << "-Werror"
-      options.compilerArgs += ["--release", String.valueOf(minJavaVersion)]

Review Comment:
   Could you please add `minClientJavaVersion` and `minServerJavaVersion`?



##########
build.gradle:
##########
@@ -116,6 +116,13 @@ ext {
   configureJavaCompiler = { name, options ->
     // -parameters generates arguments with parameter names in 
TestInfo#getDisplayName.
     // ref: 
https://github.com/junit-team/junit5/blob/4c0dddad1b96d4a20e92a2cd583954643ac56ac0/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java#L161-L164
+
+    def modulesNeedingJava17 = [
+      ":core", ":coordinator-common", ":generator", ":group-coordinator",

Review Comment:
   `connect:runtime`, `connect:mirror`, `connect:test-plugins`, and 
``connect:file` should use JDK 17 as well



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