Skip to content

Commit

Permalink
[google/compile-testing#222] add JVM arg to allow access to compiler …
Browse files Browse the repository at this point in the history
…internal APIs on Java 16
  • Loading branch information
remkop authored and MarkoMackic committed Oct 17, 2021
1 parent e02ac05 commit 008a719
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions picocli-annotation-processing-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ dependencies {
testImplementation files(org.gradle.internal.jvm.Jvm.current().getToolsJar()) // needed on Java 8: https://github.com/google/compile-testing/issues/102 (and #28)
}
}
tasks.withType(Test.class) {
if (org.gradle.api.JavaVersion.current().isJava12Compatible()) { // only a problem from Java 16, but okay
it.jvmArgs '--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' // https://github.com/google/compile-testing/issues/222
}
}

jar {
manifest {
attributes 'Specification-Title': 'Picocli Annotation Processing Tests',
Expand Down

0 comments on commit 008a719

Please sign in to comment.