Skip to content

Commit

Permalink
Allow for compiling with Java 21 (openhab#16594)
Browse files Browse the repository at this point in the history
* Support Java 17 and 21, default compilation to Java 17 class files
* Add profile "j21" to compile to Java 21 class files
* Bump ecj to 3.36.0

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
  • Loading branch information
holgerfriedrich authored and pgfeller committed Sep 29, 2024
1 parent df0bd2e commit 3ed08cb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<oh.java.version>17</oh.java.version>
<maven.compiler.source>${oh.java.version}</maven.compiler.source>
<maven.compiler.target>${oh.java.version}</maven.compiler.target>
<maven.compiler.compilerVersion>${oh.java.version}</maven.compiler.compilerVersion>
<maven.compiler.release>${oh.java.version}</maven.compiler.release>

<ohc.version>4.2.0-SNAPSHOT</ohc.version>
<bnd.version>7.0.0</bnd.version>
Expand Down Expand Up @@ -327,7 +325,7 @@ Import-Package: \\
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.30.0</version>
<version>3.36.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -637,7 +635,7 @@ Import-Package: \\
<configuration>
<rules>
<requireJavaVersion>
<version>[17.0,18.0)</version>
<version>[17.0,18.0),[21.0,22.0)</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down Expand Up @@ -822,6 +820,13 @@ Import-Package: \\
</pluginManagement>
</build>
</profile>
<profile>
<id>j21</id>
<properties>
<oh.java.version>21</oh.java.version>
<maven.compiler.release>${oh.java.version}</maven.compiler.release>
</properties>
</profile>
</profiles>

</project>

0 comments on commit 3ed08cb

Please sign in to comment.