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


##########
build.gradle:
##########
@@ -769,7 +769,8 @@ subprojects {
     scalaCompileOptions.additionalParameters += ["-Xfatal-warnings"]
 
     scalaCompileOptions.additionalParameters += ["-release", 
String.valueOf(minJavaVersion)]
-
+    sourceCompatibility = minJavaVersion

Review Comment:
   Both fields are deprecated 
(https://docs.gradle.org/current/userguide/upgrading_version_8.html#javacompile_tasks_may_fail_when_using_a_jre_even_if_compilation_is_not_necessary),
 so maybe we can use options.compilerArgs += ["--release", 
String.valueOf(minJavaVersion)] 
(https://docs.gradle.org/current/dsl/org.gradle.api.tasks.scala.ScalaCompile.html#org.gradle.api.tasks.scala.ScalaCompile:options)
 instead?
   
   By the way, #16965 aims to use a helper to align JVM options for both 
JavaCompile and ScalaCompile. The release setting can be unified through the 
helper 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