Skip to content

Commit

Permalink
Merge pull request zalando#1434 from zalando/java_17_support
Browse files Browse the repository at this point in the history
Java 17 compiler support while keeping source/target levels intact
  • Loading branch information
msdousti authored Feb 24, 2023
2 parents c410454 + f95ec8e commit ebaa589
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ jobs:
profile: ['']
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.m2
key: m2
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: temurin
java-version: 17
cache: 'maven'
- name: Compile
run: ./mvnw clean test-compile -B
- name: Test
Expand Down
5 changes: 1 addition & 4 deletions logbook-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<jackson.version>2.14.2</jackson.version>
<json-path.version>2.7.0</json-path.version>
Expand Down Expand Up @@ -402,7 +399,7 @@
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<configuration>
<jvmTarget>${java.version}</jvmTarget>
<jvmTarget>${maven.compiler.target}</jvmTarget>
<args>
<arg>-Xopt-in=kotlin.RequiresOptIn</arg>
</args>
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<modules>
<module>logbook-parent</module>
Expand Down

0 comments on commit ebaa589

Please sign in to comment.