-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK8 configuration applied to JDK11 compile tasks when Gradle itself is running under JDK8 #117
Comments
Actually I missed that |
…ork-gradle-plugin#117 The plugin bases its configuration in part on what JVM Gradle runs during configuration, which is JRE8 currently. Specifically it sets -Xbootclasspath/p seemingly because: - the Gradle JVM used during configure is version 8 - the source level is 8 - Checker version is >= 3
This is tricky because I'm not sure how we'd detect that a different JVM is being substituted in the general case. One option would be to check whether the compile task has In your scenario, though (which unless I misunderstand is different flavors of CI builds - that is, checking that everything works under both Java 8 and Java 11), skipping the CF on the Java 11 builds is the right choice, because the results will be identical to the Java 8 builds, since the CF is a source-level analysis (as you mentioned in apache/beam#12395). |
Steps to reproduce on Mac with JAVA_HOME set to some JDK8 and JAVA11_HOME set to some JDK11
In various environments, this fails because of the
-Xbootclasspath/p
and--release
options.Background: based on the gradle properties set there, we fork a separate Java 11 JVM to compile and run the tests: https://github.com/apache/beam/blob/02092dc36f3c8b2fa776c0513a1560d70924e8f7/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy#L725
However, it is too late, because this line of the plugin has already run:
checkerframework-gradle-plugin/src/main/groovy/org/checkerframework/gradle/plugin/CheckerFrameworkPlugin.groovy
Line 373 in 6739a86
The text was updated successfully, but these errors were encountered: