mingyen066 commented on code in PR #17423:
URL: https://github.com/apache/kafka/pull/17423#discussion_r1792674206
##########
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]