Skip to content

Commit

Permalink
Support Java 17 in kore submodule (#4032)
Browse files Browse the repository at this point in the history
In #3736, we updated to Java 17 by configuring the Java version for
`maven-compiler-plugin`.

However - after banging my head against a wall for the past hour
wondering why none of my code is parsing 🙃 - I realized that the `kore`
and `matching` submodules are actually built by `scala-maven-plugin`
rather than `maven-compiler-plugin`, and their Java version must be set
independently.

This PR sets the version for `kore` to Java 17, and
runtimeverification/llvm-backend#993 will do the same for `matching`.
  • Loading branch information
Scott-Guest committed Feb 23, 2024
1 parent d23cec4 commit 14dc837
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions kore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
<javacArgs>
<javacArg>-source</javacArg>
<javacArg>${java.version}</javacArg>
<javacArg>-target</javacArg>
<javacArg>${java.version}</javacArg>
</javacArgs>
</configuration>
</plugin>
</plugins>
Expand Down
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<skipCheckstyleOnWindows>true</skipCheckstyleOnWindows>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.type>FastBuild</project.build.type>
<java.version>17</java.version>
<scala.majorVersion>2.12</scala.majorVersion>
<scala.minorVersion>18</scala.minorVersion>
<scala.version>${scala.majorVersion}.${scala.minorVersion}</scala.version>
Expand Down Expand Up @@ -167,8 +168,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>17</source>
<target>17</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<!-- Antrun plugin for running arbitrary shell commands (building subprojects) -->
Expand Down Expand Up @@ -248,7 +249,7 @@
<configuration>
<rules>
<requireJavaVersion>
<version>[11,)</version>
<version>[${java.version},)</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down

0 comments on commit 14dc837

Please sign in to comment.