Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add jpms definition for annotations #4311

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion annotation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module versions must begin with a number, so the dev version has been updated to 1.0-HEAD-SNAPSHOT.

</parent>

<name>@BugPattern annotation</name>
Expand Down
36 changes: 33 additions & 3 deletions annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>

<name>error-prone annotations</name>
Expand Down Expand Up @@ -49,10 +49,40 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<compilerArgs combine.self="override" />
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<source>1.8</source>
<target>1.8</target>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
Comment on lines +56 to +63
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configures default compile at JDK 8.

</execution>
<execution>
<id>compile-java9</id>
<configuration>
<source>9</source>
<target>9</target>
<release>9</release>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
Comment on lines +65 to +72
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra execution covers JDK 9+.

</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
22 changes: 22 additions & 0 deletions annotations/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2015 The Error Prone Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

open module com.google.errorprone.annotation {
requires java.base;
requires java.compiler;
exports com.google.errorprone.annotations;
exports com.google.errorprone.annotations.concurrent;
}
Comment on lines +17 to +22
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expressed as an open module to enable reflective introspection of annotations.

2 changes: 1 addition & 1 deletion check_api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>

<name>error-prone check api</name>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>

<name>error-prone library</name>
Expand Down
2 changes: 1 addition & 1 deletion docgen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>

<name>Documentation tool for generating Error Prone bugpattern documentation</name>
Expand Down
2 changes: 1 addition & 1 deletion docgen_processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>

<name>JSR-269 annotation processor for @BugPattern annotation</name>
Expand Down
12 changes: 11 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<name>Error Prone parent POM</name>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
<packaging>pom</packaging>

<description>Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time.</description>
Expand Down Expand Up @@ -204,6 +204,16 @@
<exclude>**/testdata/**</exclude>
</testExcludes>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgs combine.children="append">
<arg>-Xlint:-options</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
Comment on lines +207 to +216
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoids some warnings during the build about JDK 8 being removed eventually.

</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
2 changes: 1 addition & 1 deletion refaster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>error_prone_parent</artifactId>
<groupId>com.google.errorprone</groupId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion test_helpers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>

<name>error-prone test helpers</name>
Expand Down
2 changes: 1 addition & 1 deletion type_annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_parent</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.0-HEAD-SNAPSHOT</version>
</parent>

<name>error-prone type annotations</name>
Expand Down
Loading