mingyen066 commented on code in PR #17423:
URL: https://github.com/apache/kafka/pull/17423#discussion_r1792672937


##########
build.gradle:
##########
@@ -2832,7 +2824,7 @@ project(':streams:streams-scala') {
     dependsOn 'copyDependantLibs'
   }
 
-  // spotless 6.14 requires Java 11 at runtime
+  // spotless 6.25 requires Java 11 at runtime
   if (JavaVersion.current().isJava11Compatible()) {

Review Comment:
   Can we also OR Java 17 in this if condition?



##########
build.gradle:
##########
@@ -854,17 +851,12 @@ subprojects {
     skipProjects = [ ":jmh-benchmarks", ":trogdor" ]
     skipConfigurations = [ "zinc" ]
   }
-  //  the task `removeUnusedImports` is implemented by google-java-format,
-  //  and unfortunately the google-java-format version used by spotless 6.14.0 
can't work with JDK 21.
-  //  Hence, we apply spotless tasks only if the env is either JDK11 or JDK17
-  if ((JavaVersion.current().isJava11() || (JavaVersion.current() == 
JavaVersion.VERSION_17))) {
-    apply plugin: 'com.diffplug.spotless'
-    spotless {
-      java {
-        targetExclude('**/generated/**/*.java','**/generated-test/**/*.java')
-        importOrder('kafka', 'org.apache.kafka', 'com', 'net', 'org', 'java', 
'javax', '', '\\#')
-        removeUnusedImports()
-      }
+  apply plugin: 'com.diffplug.spotless'
+  spotless {
+    java {
+      targetExclude('**/generated/**/*.java','**/generated-test/**/*.java')
+      importOrder('kafka', 'org.apache.kafka', 'com', 'net', 'org', 'java', 
'javax', '', '\\#')
+      removeUnusedImports()

Review Comment:
   I think the limitation written in comment is still their? can we use 
removeUnusedImports in JDK 21 already?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to