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

View File

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

View File

@@ -14,7 +14,7 @@ jobs:
- name: Set up JDK - name: Set up JDK
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: 17 java-version: 21
distribution: 'temurin' distribution: 'temurin'
cache: 'maven' cache: 'maven'
- name: Login to Docker Hub - 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 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 ```bash
# Build the project (use mvnw.cmd on windows): # Build the project (use mvnw.cmd on windows):

10
pom.xml
View File

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