Skip to content

Commit 008a719

Browse files
remkopMarkoMackic
authored andcommitted
[google/compile-testing#222] add JVM arg to allow access to compiler internal APIs on Java 16
1 parent e02ac05 commit 008a719

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

picocli-annotation-processing-tests/build.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ dependencies {
2121
testImplementation files(org.gradle.internal.jvm.Jvm.current().getToolsJar()) // needed on Java 8: https://github.com/google/compile-testing/issues/102 (and #28)
2222
}
2323
}
24+
tasks.withType(Test.class) {
25+
if (org.gradle.api.JavaVersion.current().isJava12Compatible()) { // only a problem from Java 16, but okay
26+
it.jvmArgs '--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' // https://github.com/google/compile-testing/issues/222
27+
}
28+
}
29+
2430
jar {
2531
manifest {
2632
attributes 'Specification-Title': 'Picocli Annotation Processing Tests',

0 commit comments

Comments
 (0)