cushon commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1002248626
##########
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy:
##########
@@ -913,6 +913,11 @@ class BeamModulePlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
+ // Use --release 8 when targeting Java 8 and running on JDK > 8
+ if
(JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion))
== 0
+ && JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
Review Comment:
I do not have a lot of gradle experience, sorry for the naive question: how
do I do that? I thought that `JavaCompile ` covered both `compileJava` and
`compileTestJava` tasks.
--
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]