kennknowles commented on code in PR #28726:
URL: https://github.com/apache/beam/pull/28726#discussion_r1341443087
##########
sdks/java/testing/jpms-tests/build.gradle:
##########
@@ -21,7 +21,14 @@ import groovy.json.JsonOutput
plugins {
id 'org.apache.beam.module'
}
-javaVersion="1.11"
+
+// overwrite javaVersion before applyJavaNature
+if (project.hasProperty("compileAndRunTestsWithJava17")) {
+ javaVersion = '1.17'
+} else {
+ javaVersion = '1.11'
Review Comment:
Future TODO: maybe just have a `testJavaVersion` separate from
`beamJavaVersion` rather than a boolean with a giant name that sounds more
complicated than it is.
##########
sdks/java/testing/jpms-tests/build.gradle:
##########
@@ -33,30 +40,15 @@ enableJavaPerformanceTesting()
description = "Apache Beam :: SDKs :: Java :: Testing :: JPMS Tests"
ext.summary = "E2E test for Java 9 modules"
-// Java 17 needs compileJava to add-exports and add-opens for error prone
-if (project.hasProperty("compileAndRunTestsWithJava17")) {
- def java17Home = project.findProperty("java17Home")
- project.tasks.withType(JavaCompile) {
+// direct compileJava to use specified java version.
+project.tasks.compileJava {
Review Comment:
Seems OK to me if it works. Do you need `setJava11Options`?
--
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]