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


##########
build.gradle:
##########
@@ -113,22 +114,29 @@ ext {
 
   commitId = determineCommitId()
 
-  configureJavaCompiler = { name, options ->
+  isModuleNeedJava11 = { projectPath ->
+    def modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", 
":streams-scala"]
+    modulesNeedingJava11.any { projectPath.equals(it) }
+  }
+
+  configureJavaCompiler = { name, options, projectPath ->
     // -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
-    if (name == "compileTestJava" || name == "compileTestScala") {
+
+    def releaseVersion = isModuleNeedJava11(projectPath) ? 
minClientJavaVersion : minServerJavaVersion

Review Comment:
   ```
   def releaseVersion = modulesNeedingJava11.any { projectPath == it } ? 
minClientJavaVersion : minServerJavaVersion
   ```



##########
build.gradle:
##########
@@ -726,7 +734,9 @@ subprojects {
   }
 
   tasks.withType(ScalaCompile) {
-
+    def modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", 
":streams-scala"]
+    def releaseVersion = modulesNeedingJava11.any { project.path.equals(it) } ?

Review Comment:
   ```
       def releaseVersion = modulesNeedingJava11.any { project.path == it } ? 
minClientJavaVersion : minServerJavaVersion
   ```



##########
build.gradle:
##########
@@ -47,7 +47,8 @@ plugins {
 
 ext {
   gradleVersion = versions.gradle
-  minJavaVersion = 11
+  minClientJavaVersion = 11
+  minServerJavaVersion = 17
   buildVersionFileName = "kafka-version.properties"

Review Comment:
   Could you please move `modulesNeedingJava11` up to line#52?
   
   ```
   modulesNeedingJava11 = [":clients", ":streams", ":streams:test-utils", 
":streams-scala"]
   ```



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