Skip to content
Merged
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
Empty file removed .build-jdk17
Empty file.
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
java: [ 17, 21, 25 ]
name: jdk-${{ matrix.java }}
steps:
- uses: actions/checkout@v3
Expand All @@ -16,9 +16,19 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
# The JDK listed last will be the default and what Maven runs with
# https://github.com/marketplace/actions/setup-java-jdk#install-multiple-jdks
java-version: |
${{ matrix.java }}
25
cache: "maven"
- name: "Build"
run: mvn --batch-mode -no-transfer-progress -V verify
run: |
mvn \
--batch-mode \
-no-transfer-progress \
-V \
-Dproject.build.jdk.version=${{ matrix.java }} \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This property sets the JDK toolchain-aware plugins, like maven-compiler-plugin and maven-surefire-plugin, use for their forked JVMs.

verify
env:
JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED
20 changes: 18 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.hubspot</groupId>
<artifactId>basepom</artifactId>
<version>63.4</version>
<version>65.1</version>
</parent>

<groupId>com.hubspot.jinjava</groupId>
Expand All @@ -17,12 +17,12 @@

<properties>
<project.build.targetJdk>17</project.build.targetJdk>
<project.build.releaseJdk>17</project.build.releaseJdk>

<dep.plugin.jacoco.version>0.8.3</dep.plugin.jacoco.version>
<dep.plugin.javadoc.version>3.0.1</dep.plugin.javadoc.version>
<dep.hubspot-immutables.version>1.9</dep.hubspot-immutables.version>
<dep.algebra.version>1.5</dep.algebra.version>
<dep.mockito.version>5.20.0</dep.mockito.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.

This bump is required to upgrade to a version of Byte Buddy that understands Java 25 class files.



<basepom.test.add.opens>
Expand Down Expand Up @@ -181,6 +181,10 @@
<groupId>ch.obermuhlner</groupId>
<artifactId>big-math</artifactId>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</dependency>
Comment on lines +184 to +187
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some of these annotations (like @CanIgnoreReturnValue) are now getting added to the generated Immutables, but I'm not sure why. Seems like Immutables will add them if they're on the classpath, but from what I can tell, they've always been on the classpath via Guava. 🤷


<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down Expand Up @@ -336,6 +340,18 @@
<argLine>@{argLine} ${basepom.test.add.opens}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
</path>
</annotationProcessorPaths>
Comment on lines +347 to +352
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Java 25 requires that we explicitly enable annotation processing. I chose to do that here by manually specifying the Immutables processor.

</configuration>
</plugin>
</plugins>
</build>

Expand Down