From 622b59136c480a9aeca3fd6b4cc433c87777f8bd Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Fri, 22 Jan 2021 13:10:38 -0800 Subject: [PATCH] Get tests running on latest JDK 16 EA * set necessary `--add-exports=` and `--add-opens=` flags to allow the Error Prone plugin to access internal javac APIs when running on JDK 16 * set `--illegal-access=permit` to allow access of internal javac APIs by tests PiperOrigin-RevId: 353304282 --- pom.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a3f08bb4..d9ac81dc 100644 --- a/pom.xml +++ b/pom.xml @@ -155,10 +155,20 @@ 8 8 UTF-8 + true -parameters -XDcompilePolicy=simple -Xplugin:ErrorProne + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED @@ -199,7 +209,7 @@ 2.19.1 - -Xmx2g + -Xmx2g --illegal-access=permit @@ -256,7 +266,10 @@ maven-compiler-plugin true - + + -parameters + -XDcompilePolicy=simple + -Xplugin:ErrorProne -J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar