Skip to content

Commit 9763ea8

Browse files
committed
chore: align JDK support and fix Error Prone compilation on JDK 11/17
- Set fail-fast: false in GitHub Actions. - Use conditional Error Prone versions based on build JDK (2.31.0 for 11+, 2.42.0 for 17+, 2.48.0 for 21+). - Add -XDaddTypeAnnotationsToSymbol=true for JDK 21+. - Move maven-compiler-plugin config to pluginManagement for better merging. - Update version in README.md to match pom.xml.
1 parent bf62f03 commit 9763ea8

3 files changed

Lines changed: 54 additions & 15 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
# https://github.com/federicocarboni/setup-ffmpeg/issues/19
1717
environment: debug
1818
strategy:
19+
fail-fast: false
1920
matrix:
2021
# Long term supported versions
2122
java-version: [11, 17, 21]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ We currently support Java 11 and above. Use Maven to install the dependency.
2222
<dependency>
2323
<groupId>net.bramp.ffmpeg</groupId>
2424
<artifactId>ffmpeg</artifactId>
25-
<version>0.8.0</version>
25+
<version>0.8.1-SNAPSHOT</version>
2626
</dependency>
2727
```
2828

pom.xml

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4747
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
48+
49+
<error.prone.version>2.31.0</error.prone.version>
4850
</properties>
4951

5052
<dependencyManagement>
@@ -257,6 +259,19 @@
257259
<groupId>org.apache.maven.plugins</groupId>
258260
<artifactId>maven-compiler-plugin</artifactId>
259261
<version>3.15.0</version>
262+
<configuration>
263+
<source>${base.java.version}</source>
264+
<target>${base.java.version}</target>
265+
<showWarnings>true</showWarnings>
266+
<failOnError>true</failOnError>
267+
<failOnWarning>true</failOnWarning>
268+
<compilerArgs>
269+
<!-- Surpress maven option warnings because we are
270+
focusing on code issues -->
271+
<arg>-Xlint:-options</arg>
272+
<arg>-Xlint:all</arg>
273+
</compilerArgs>
274+
</configuration>
260275
</plugin>
261276
<plugin>
262277
<groupId>net.revelc.code</groupId>
@@ -319,19 +334,6 @@
319334
<plugin>
320335
<groupId>org.apache.maven.plugins</groupId>
321336
<artifactId>maven-compiler-plugin</artifactId>
322-
<configuration>
323-
<source>${base.java.version}</source>
324-
<target>${base.java.version}</target>
325-
<showWarnings>true</showWarnings>
326-
<failOnError>true</failOnError>
327-
<failOnWarning>true</failOnWarning>
328-
<compilerArgs>
329-
<!-- Surpress maven option warnings because we are
330-
focusing on code issues -->
331-
<arg>-Xlint:-options</arg>
332-
<arg>-Xlint:all</arg>
333-
</compilerArgs>
334-
</configuration>
335337
</plugin>
336338
<plugin>
337339
<groupId>org.apache.maven.plugins</groupId>
@@ -754,7 +756,7 @@
754756
<path>
755757
<groupId>com.google.errorprone</groupId>
756758
<artifactId>error_prone_core</artifactId>
757-
<version>2.48.0</version>
759+
<version>${error.prone.version}</version>
758760
</path>
759761
<!-- Other annotation processors go here.
760762
@@ -815,5 +817,41 @@
815817
</pluginManagement>
816818
</build>
817819
</profile>
820+
821+
<profile>
822+
<id>Java 17+</id>
823+
<activation>
824+
<jdk>[17,)</jdk>
825+
</activation>
826+
<properties>
827+
<error.prone.version>2.42.0</error.prone.version>
828+
</properties>
829+
</profile>
830+
831+
<profile>
832+
<id>Java 21+</id>
833+
<activation>
834+
<jdk>[21,)</jdk>
835+
</activation>
836+
<properties>
837+
<error.prone.version>2.48.0</error.prone.version>
838+
</properties>
839+
<build>
840+
<pluginManagement>
841+
<plugins>
842+
<plugin>
843+
<groupId>org.apache.maven.plugins</groupId>
844+
<artifactId>maven-compiler-plugin</artifactId>
845+
<configuration>
846+
<compilerArgs combine.children="append">
847+
<!-- Flag needed for JDK 21+ Error Prone -->
848+
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
849+
</compilerArgs>
850+
</configuration>
851+
</plugin>
852+
</plugins>
853+
</pluginManagement>
854+
</build>
855+
</profile>
818856
</profiles>
819857
</project>

0 commit comments

Comments
 (0)