GitHub Actions: build using Java 19 (use toolchain because Gradle 7.5.1 does not support running on Java 19)

This commit is contained in:
Karl Tauber
2022-09-28 19:15:59 +02:00
parent 12fc2299ec
commit ca88023560
12 changed files with 43 additions and 1 deletions

View File

@@ -26,6 +26,10 @@ jobs:
- 8
- 11 # LTS
- 17 # LTS
toolchain: [""]
include:
- java: 17
toolchain: 19 # latest
steps:
- uses: actions/checkout@v3
@@ -41,7 +45,7 @@ jobs:
cache: gradle
- name: Build with Gradle
run: ./gradlew build
run: ./gradlew build -Dtoolchain=${{ matrix.toolchain }}
- name: Upload artifacts
uses: actions/upload-artifact@v3

View File

@@ -37,6 +37,9 @@ println( "----------------------------------------------------------------------
println( "FlatLaf Version: ${version}" )
println( "Gradle ${gradle.gradleVersion} at ${gradle.gradleHomeDir}" )
println( "Java ${System.getProperty( "java.version" )}" )
val toolchainJavaVersion = System.getProperty( "toolchain" )
if( !toolchainJavaVersion.isNullOrEmpty() )
println( "Java toolchain ${toolchainJavaVersion}" )
println()

View File

@@ -0,0 +1,26 @@
/*
* Copyright 2022 FormDev Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
java
}
val toolchainJavaVersion = System.getProperty( "toolchain" )
if( !toolchainJavaVersion.isNullOrEmpty() ) {
java.toolchain {
languageVersion.set( JavaLanguageVersion.of( toolchainJavaVersion ) )
}
}

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
`flatlaf-module-info`
`flatlaf-java9`
`flatlaf-publish`

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
}
dependencies {

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
`flatlaf-module-info`
`flatlaf-publish`
}

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
`flatlaf-module-info`
`flatlaf-publish`
}

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
`flatlaf-publish`
}

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
}
dependencies {

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
`flatlaf-module-info`
`flatlaf-publish`
}

View File

@@ -18,6 +18,7 @@ import java.util.Properties
plugins {
`java-library`
`flatlaf-toolchain`
}
dependencies {

View File

@@ -16,6 +16,7 @@
plugins {
`java-library`
`flatlaf-toolchain`
}
dependencies {