You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/10/21 23:07:51 UTC
[GitHub] [beam] cushon commented on a diff in pull request #23771: Use --release 8 for builds targeting Java 8
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org