pawelpasterz commented on a change in pull request #11076: Run precommit
portability on java 11
URL: https://github.com/apache/beam/pull/11076#discussion_r391225981
##########
File path: build.gradle
##########
@@ -335,3 +335,27 @@ if (project.hasProperty('javaLinkageArtifactIds')) {
}
}
}
+
+if (project.hasProperty('runWithJava11')) {
+ allprojects {
+ plugins.withId('java') {
+
+ java {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+
+ tasks.withType(JavaCompile) {
+ options.with {
+ fork = true
+ forkOptions.javaHome = java8Home as File
+ }
+ }
+
+ test {
Review comment:
@Ardagan regarding first comment -- it will compile tests with java 8. TBH
I thought that approach is the first we want to take. Possible next steps would
be to compile/run with java 11. On the second thought, what would you like to
achieve is to check if user's code compiled with J11 would run with beam
(compiled with J8)? Let me know what you think
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services