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 committed Mar 31, 2021
1 parent 29e8567 commit e245450
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 e245450

Please sign in to comment.