Raise minimum JDK version to 17 (#1588)

* Raise minimum JDK version to 17

Signed-off-by: Jan N. Klug <github@klug.nrw>
pull/1602/head
J-N-K 2022-12-19 23:20:09 +01:00 committed by GitHub
parent f97323690f
commit 38f44af1e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 14 deletions

View File

@ -18,7 +18,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
java: [ '11', '17' ] java: [ '17' ]
maven: [ '3.8.6' ] maven: [ '3.8.6' ]
os: [ 'ubuntu-22.04' ] os: [ 'ubuntu-22.04' ]
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }}) name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
@ -56,7 +56,7 @@ jobs:
maven-version: ${{ matrix.maven }} maven-version: ${{ matrix.maven }}
- name: Register Problem Matchers - name: Register Problem Matchers
if: ${{ matrix.java == '11' }} if: ${{ matrix.java == '17' }}
id: problem_matchers id: problem_matchers
run: | run: |
echo "::add-matcher::.github/openhab-compile-problems.json" echo "::add-matcher::.github/openhab-compile-problems.json"
@ -86,7 +86,7 @@ jobs:
path: target/summary_report.html path: target/summary_report.html
- name: Report SAT Errors as Annotations - name: Report SAT Errors as Annotations
if: ${{ matrix.java == '11' && always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }} if: ${{ matrix.java == '17' && always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
uses: ghys/checkstyle-github-action@main uses: ghys/checkstyle-github-action@main
with: with:
title: CheckStyle Violations title: CheckStyle Violations

27
pom.xml
View File

@ -62,7 +62,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<oh.java.version>11</oh.java.version> <oh.java.version>17</oh.java.version>
<maven.compiler.source>${oh.java.version}</maven.compiler.source> <maven.compiler.source>${oh.java.version}</maven.compiler.source>
<maven.compiler.target>${oh.java.version}</maven.compiler.target> <maven.compiler.target>${oh.java.version}</maven.compiler.target>
<maven.compiler.compilerVersion>${oh.java.version}</maven.compiler.compilerVersion> <maven.compiler.compilerVersion>${oh.java.version}</maven.compiler.compilerVersion>
@ -73,7 +73,8 @@
<karaf.version>4.3.7</karaf.version> <karaf.version>4.3.7</karaf.version>
<ohc.version>4.0.0-SNAPSHOT</ohc.version> <ohc.version>4.0.0-SNAPSHOT</ohc.version>
<sat.version>0.13.0</sat.version> <sat.version>0.13.0</sat.version>
<spotless.version>2.0.3</spotless.version> <spotless.version>2.28.0</spotless.version>
<spotless.eclipse.version>4.21.0</spotless.eclipse.version>
</properties> </properties>
<build> <build>
@ -254,12 +255,12 @@ Import-Package: \\
<dependency> <dependency>
<groupId>org.codehaus.plexus</groupId> <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId> <artifactId>plexus-compiler-eclipse</artifactId>
<version>2.11.1</version> <version>2.12.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jdt</groupId> <groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId> <artifactId>ecj</artifactId>
<version>3.28.0</version> <version>3.30.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
@ -327,8 +328,12 @@ Import-Package: \\
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version> <version>3.0.0-M7</version>
<configuration> <configuration>
<argLine>
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
</argLine>
<systemPropertyVariables> <systemPropertyVariables>
<junit.jupiter.execution.timeout.default>15 m</junit.jupiter.execution.timeout.default> <junit.jupiter.execution.timeout.default>15 m</junit.jupiter.execution.timeout.default>
</systemPropertyVariables> </systemPropertyVariables>
@ -442,7 +447,7 @@ Import-Package: \\
<java> <java>
<eclipse> <eclipse>
<file>openhab_codestyle.xml</file> <file>openhab_codestyle.xml</file>
<version>4.13.0</version> <version>${spotless.eclipse.version}</version>
</eclipse> </eclipse>
<removeUnusedImports/> <removeUnusedImports/>
<importOrder> <importOrder>
@ -469,7 +474,7 @@ Import-Package: \\
<files> <files>
<file>openhab_wst_xml_files.prefs</file> <file>openhab_wst_xml_files.prefs</file>
</files> </files>
<version>4.13.0</version> <version>${spotless.eclipse.version}</version>
</eclipseWtp> </eclipseWtp>
<trimTrailingWhitespace/> <trimTrailingWhitespace/>
<endWithNewline/> <endWithNewline/>
@ -484,7 +489,7 @@ Import-Package: \\
<files> <files>
<file>openhab_wst_pom_file.prefs</file> <file>openhab_wst_pom_file.prefs</file>
</files> </files>
<version>4.13.0</version> <version>${spotless.eclipse.version}</version>
</eclipseWtp> </eclipseWtp>
<trimTrailingWhitespace/> <trimTrailingWhitespace/>
<endWithNewline/> <endWithNewline/>
@ -516,7 +521,7 @@ Import-Package: \\
<plugin> <plugin>
<groupId>org.commonjava.maven.plugins</groupId> <groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId> <artifactId>directory-maven-plugin</artifactId>
<version>0.3.1</version> <version>1.0</version>
<executions> <executions>
<execution> <execution>
<id>directories</id> <id>directories</id>
@ -547,7 +552,7 @@ Import-Package: \\
<configuration> <configuration>
<rules> <rules>
<requireJavaVersion> <requireJavaVersion>
<version>[11.0,18.0)</version> <version>[17.0,18.0)</version>
</requireJavaVersion> </requireJavaVersion>
</rules> </rules>
</configuration> </configuration>
@ -612,7 +617,7 @@ Import-Package: \\
<pluginExecutionFilter> <pluginExecutionFilter>
<groupId>org.commonjava.maven.plugins</groupId> <groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId> <artifactId>directory-maven-plugin</artifactId>
<versionRange>[0.3.1,)</versionRange> <versionRange>[1.0,)</versionRange>
<goals> <goals>
<goal>directory-of</goal> <goal>directory-of</goal>
</goals> </goals>