GitHub Actions:

- build using Java 20 (use toolchain because Gradle 8.1.1 does not support running and compiling on Java 20 because Kotlin does not support 20 as target version)
- use temurin distribution as default because it is pre-installed on ubuntu-latest
This commit is contained in:
Karl Tauber
2023-06-21 17:14:29 +02:00
parent f003e835bd
commit 242c478cb3
4 changed files with 14 additions and 8 deletions

View File

@@ -26,9 +26,9 @@ jobs:
- 17 # LTS - 17 # LTS
- 19 - 19
toolchain: [""] toolchain: [""]
# include: include:
# - java: 17 - java: 17
# toolchain: 19 # latest toolchain: 20 # latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -40,7 +40,7 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
distribution: adopt # Java 8 and 11 are pre-installed on ubuntu-latest distribution: temurin # Java 8, 11 and 17 are pre-installed on ubuntu-latest
cache: gradle cache: gradle
- name: Check with Error Prone - name: Check with Error Prone
@@ -77,7 +77,7 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: adopt # pre-installed on ubuntu-latest distribution: temurin # pre-installed on ubuntu-latest
cache: gradle cache: gradle
- name: Publish snapshot to oss.sonatype.org - name: Publish snapshot to oss.sonatype.org
@@ -113,7 +113,7 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: adopt # pre-installed on ubuntu-latest distribution: temurin # pre-installed on ubuntu-latest
cache: gradle cache: gradle
- name: Release a new stable version to Maven Central - name: Release a new stable version to Maven Central

View File

@@ -36,7 +36,7 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: adopt # pre-installed on ubuntu-latest distribution: temurin # pre-installed on ubuntu-latest
cache: gradle cache: gradle
- name: Build with Gradle - name: Build with Gradle

View File

@@ -33,7 +33,7 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: adopt distribution: temurin
cache: gradle cache: gradle
- name: Build with Gradle - name: Build with Gradle

View File

@@ -40,3 +40,9 @@ fun includeProject( projectPath: String, projectDir: String ) {
include( projectPath ) include( projectPath )
project( ":$projectPath" ).projectDir = file( projectDir ) project( ":$projectPath" ).projectDir = file( projectDir )
} }
// for using newer Java version via toolchain
plugins {
id( "org.gradle.toolchains.foojay-resolver-convention" ) version( "0.5.0" )
}