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


##########
build.gradle:
##########
@@ -47,9 +47,10 @@ plugins {
   // Updating the shadow plugin version to 8.1.1 causes issue with signing and 
publishing the shadowed
   // artifacts - see https://github.com/johnrengelman/shadow/issues/901
   id 'com.github.johnrengelman.shadow' version '8.1.0' apply false
-  //  the minimum required JRE of 6.14.0+ is 11
-  //  
refer:https://github.com/diffplug/spotless/tree/main/plugin-gradle#requirements
-  id 'com.diffplug.spotless' version "6.13.0" apply false
+  //  Spotless 6.13.0 has issue with Java 21 (see 
https://github.com/diffplug/spotless/pull/1920), and Spotless 6.14.0+ requires 
JRE 11
+  //  We are going to drop JDK8 support. Hence, the spotless is upgrade to 
newest version and be applied only if the build env is compatible with JDK 11.
+  //  spotless 6.15.0+ has issue in runtime with JDK8 even through we define 
it with `apply:false`. see https://github.com/diffplug/spotless/issues/2156 for 
more details
+  id 'com.diffplug.spotless' version "6.14.0" apply false

Review Comment:
   yep, you are right. We have set the `sourceCompatibility=8`
   
   https://github.com/apache/kafka/blob/trunk/build.gradle#L57
   https://github.com/apache/kafka/blob/trunk/build.gradle#L318
   
   I know that we can use JDK11 to build kafak which is compatible with JRE8. 
However, our rules is "we ought to run all checks/tests with all supported 
JDKs". That is why we need to make sure spotless can work with all supported 
JDKs.
   
   for another, we will drop JDK8 in next release. Hence, we can remove this 
workaround and upgrade spotless to newest version later.



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