Skip to content

Commit

Permalink
Update checker configuration to also load errorprone-javac on jdk8.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarwell committed Jul 30, 2019
1 parent edfb78d commit 0bcc432
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-Dfile.encoding=UTF-8
-Duser.language=en
-Djava.awt.headless=true
-Djava.net.useSystemProxies=true
-Dchecker.stubs.dir=${PWD}/build/checker/stubs
-Xmx1024m
2 changes: 1 addition & 1 deletion app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</dependency>

<dependency>
<groupId>org.checkerframework</groupId>
<groupId>io.github.eisop</groupId>
<artifactId>checker-qual</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion compression/compression-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</dependency>

<dependency>
<groupId>org.checkerframework</groupId>
<groupId>io.github.eisop</groupId>
<artifactId>checker-qual</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion fileformat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</dependency>

<dependency>
<groupId>org.checkerframework</groupId>
<groupId>io.github.eisop</groupId>
<artifactId>checker-qual</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
52 changes: 43 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- dependencies -->
<dependency.checker.version>2.8.1</dependency.checker.version>
<dependency.checker.version>3.0.0-b2</dependency.checker.version>
<dependency.immutables.version>2.7.5</dependency.immutables.version>
<!-- test dependencies -->
<dependency.junit-jupiter.version>5.4.0</dependency.junit-jupiter.version>
Expand All @@ -66,9 +66,9 @@

<!-- https://mvnrepository.com/artifact/org.checkerframework/checker-qual -->
<dependency>
<groupId>org.checkerframework</groupId>
<groupId>io.github.eisop</groupId>
<artifactId>checker-qual</artifactId>
<version>2.8.1</version>
<version>${dependency.checker.version}</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -282,19 +282,19 @@
</properties>
<dependencies>
<dependency>
<groupId>org.checkerframework</groupId>
<groupId>io.github.eisop</groupId>
<artifactId>checker-qual</artifactId>
<version>${dependency.checker.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<groupId>io.github.eisop</groupId>
<artifactId>checker</artifactId>
<version>${dependency.checker.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<groupId>io.github.eisop</groupId>
<artifactId>jdk8</artifactId>
<version>${dependency.checker.version}</version>
<optional>true</optional>
Expand Down Expand Up @@ -352,19 +352,53 @@
</annotationProcessor>
</annotationProcessors>
<compilerArgs>
<arg>-Xbootclasspath/p:${org.checkerframework:jdk8:jar}</arg>
<arg>-Xbootclasspath/p:${io.github.eisop:jdk8:jar}</arg>
<!-- checker.stubs.dir needs to be absolute path since relative path will be
interpreted from each module directory -->
<arg>-Astubs=${checker.stubs.dir}</arg>
<arg>
<!--<arg>
-AskipDefs=^io\.github\.zchunk\..*\.ReflectionUtil$|^io\.github\.zchunk\..*\.ChecksumUtil$|^.*Test$
</arg>
</arg>-->
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>


<!-- using github.com/google/error-prone-javac is required when running on JDK 8 -->
<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<javac.version>9-dev-r4023-3</javac.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>javac</artifactId>
<version>9-dev-r4023-3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<compilerArgs combine.children="append">
<arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>

</profiles>

</project>

0 comments on commit 0bcc432

Please # to comment.