cushon commented on code in PR #23771:
URL: https://github.com/apache/beam/pull/23771#discussion_r1003809435


##########
sdks/java/container/agent/build.gradle:
##########
@@ -59,6 +59,7 @@ if (project.hasProperty('java11Home')) {
 project.tasks.each {
     it.onlyIf {
         project.hasProperty('java11Home') || project.hasProperty('java17Home')
-                || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+                || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+                && 
JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 
0)

Review Comment:
   Done, thanks.
   
   When I was testing earlier I hadn't been setting `-Pjava11Home=`, I was just 
setting `JAVA_HOME` to JDK 11. Is that not a supported configuration? I wasn't 
sure why it was relying on that vs. checking `JavaVersion.current()`.



##########
sdks/java/testing/jpms-tests/build.gradle:
##########
@@ -134,6 +134,7 @@ plugins.withType(JavaPlugin).configureEach{
 project.tasks.each {
   it.onlyIf {
     project.hasProperty("compileAndRunTestsWithJava17")
-            || JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+            || (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0
+            && 
JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) < 
0)

Review Comment:
   Reverted, thanks



-- 
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