Use java 21 (#124)

This commit is contained in:
Michael Barry
2023-10-25 20:48:05 -04:00
committed by GitHub
parent f885ed7ae5
commit 01b3b0e6ec
5 changed files with 15 additions and 20 deletions

View File

@@ -17,10 +17,10 @@ jobs:
steps:
- name: Checkout this PR planetiler-openmaptiles repo
uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Ensure code formatted with mvn spotless:apply
@@ -33,12 +33,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 17 ]
include:
- os: ubuntu-latest
jdk: 18
- os: ubuntu-latest
jdk: 19
jdk: [ 21 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
@@ -66,10 +61,10 @@ jobs:
steps:
- name: Checkout this PR planetiler-openmaptiles repo
uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'
- run: ./scripts/regenerate-openmaptiles.sh
@@ -88,7 +83,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Build this branch
@@ -127,7 +122,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Build and test this branch

View File

@@ -45,7 +45,7 @@ jobs:
- name: 'Set up JDK'
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'
- uses: actions/setup-node@v4

View File

@@ -14,7 +14,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Login to Docker Hub

View File

@@ -11,7 +11,7 @@ Using pre-built docker image:
docker run -v "$(pwd)/data":/data openmaptiles/planetiler-openmaptiles:latest --force --download --area=monaco
```
Or to build from source, after [installing Java 17+](https://adoptium.net/installation.html):
Or to build from source, after [installing Java 21+](https://adoptium.net/installation.html):
```bash
# Build the project (use mvnw.cmd on windows):

10
pom.xml
View File

@@ -7,8 +7,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<planetiler.version>0.7-SNAPSHOT</planetiler.version>
<junit.version>5.10.0</junit.version>
@@ -140,7 +140,7 @@
</executions>
</plugin>
<!-- require building with jdk 17 -->
<!-- require building with jdk 21 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
@@ -154,7 +154,7 @@
<configuration>
<rules>
<requireJavaVersion>
<version>17</version>
<version>21</version>
</requireJavaVersion>
</rules>
</configuration>
@@ -209,7 +209,7 @@
<configuration>
<from>
<image>
eclipse-temurin:17-jre
eclipse-temurin:21-jre
</image>
<platforms>
<platform>