From 8f35aa07c90acf4930d683d44575353bfe84a7c2 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 24 Nov 2025 10:15:27 +0000 Subject: [PATCH] Update libraries and Java 17 --- .github/workflows/testing.yml | 2 +- .gitignore | 3 ++ .mvn/jvm.config | 11 +++++ examples/pom.xml | 34 ++++++++------ pom.xml | 47 +++++++++++++------ .../checkers/ExperimentalApiChecker.java | 1 - 6 files changed, 67 insertions(+), 31 deletions(-) create mode 100644 .mvn/jvm.config diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8e7571b..9aef851 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '17' distribution: 'temurin' cache: maven - name: Build with Maven diff --git a/.gitignore b/.gitignore index 2c6822d..6e05276 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# vscode +.vscode/ + # intellij .idea/ *.iml diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 0000000..739141c --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1,11 @@ +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED diff --git a/examples/pom.xml b/examples/pom.xml index 63e4a42..fa9a79c 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -11,7 +11,7 @@ io.grpc grpc-core - 1.17.1 + 1.76.0 @@ -20,36 +20,40 @@ org.apache.maven.plugins maven-compiler-plugin - 3.5.1 + 3.14.1 javac-with-errorprone - true - 1.8 - 1.8 + true + 17 io.grpc grpc-java-api-checker - 1.1.0 + 2.0.0-SNAPSHOT + + + com.google.errorprone + error_prone_core + 2.39.0 - -XepDisableAllChecks - -Xep:GrpcInternal:ERROR - -Xep:GrpcExperimentalApi:ERROR + -XDcompilePolicy=simple + --should-stop=ifError=FLOW + -Xplugin:ErrorProne -XepAllErrorsAsWarnings - - org.codehaus.plexus - plexus-compiler-javac-errorprone - 2.5 - com.google.errorprone error_prone_core - 2.3.2 + 2.39.0 + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + 2.15.0 diff --git a/pom.xml b/pom.xml index e6e29ff..b4e9d15 100644 --- a/pom.xml +++ b/pom.xml @@ -19,10 +19,10 @@ io.grpc grpc-java-api-checker - 1.2.0-SNAPSHOT + 2.0.0-SNAPSHOT grpc-java-api-checker - An Error Prone plugin that checks for usages of grpc-java experimental or internal APIs. + An Error Prone plugin that checks for usages of grpc java experimental or internal APIs. https://github.com/grpc/grpc-java-api-checker @@ -34,10 +34,9 @@ - 1.8 - 1.8 + 17 UTF-8 - 2.10.0 + 2.39.0 9+181-r4173-1 @@ -76,6 +75,11 @@ ${errorprone.version} provided + + org.hamcrest + hamcrest + 2.2 + junit junit @@ -93,7 +97,7 @@ com.google.auto.value auto-value-annotations - 1.7.4 + 1.10.4 @@ -113,21 +117,36 @@ org.apache.maven.plugins maven-compiler-plugin - 3.7.0 + 3.14.1 + true + true ${maven.compiler.source} - ${maven.compiler.target} + ${maven.compiler.source} + + --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + org.apache.maven.plugins maven-surefire-plugin - 2.20.1 + 3.5.4 - -Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar + --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED - + @@ -174,11 +193,11 @@ org.apache.maven.plugins - maven-javadoc-plugin + mavenavadoc-plugin 3.0.0 - attach-javadocs + attachavadocs jar diff --git a/src/main/java/io/grpc/annotations/checkers/ExperimentalApiChecker.java b/src/main/java/io/grpc/annotations/checkers/ExperimentalApiChecker.java index cb382be..4335f46 100644 --- a/src/main/java/io/grpc/annotations/checkers/ExperimentalApiChecker.java +++ b/src/main/java/io/grpc/annotations/checkers/ExperimentalApiChecker.java @@ -59,7 +59,6 @@ protected Description describe(Tree tree, AnnotationMirror annotation) { tree, this.canonicalName(), link == null ? this.linkUrl() : link, - this.defaultSeverity(), this.message()) .build(); }