diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88541368..2b50eb04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Graalvm uses: graalvm/setup-graalvm@v1 with: - java-version: '17.0.8' + java-version: '21' distribution: 'graalvm' components: 'native-image' native-image-musl: 'true' @@ -96,7 +96,7 @@ jobs: - name: Setup Graalvm uses: graalvm/setup-graalvm@v1 with: - java-version: '17.0.8' + java-version: '21' distribution: 'graalvm' components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} @@ -184,7 +184,7 @@ jobs: uses: graalvm/setup-graalvm@v1 with: version: 'latest' - java-version: '17.0.8' + java-version: '21' distribution: 'graalvm' components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} @@ -278,7 +278,7 @@ jobs: - name: Setup Graalvm uses: graalvm/setup-graalvm@v1 with: - java-version: '17.0.8' + java-version: '21' distribution: 'graalvm' components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} @@ -340,7 +340,7 @@ jobs: - name: Setup Java for JReleaser uses: actions/setup-java@v4 with: - java-version: 17.0.8 + java-version: '21' distribution: 'adopt' - name: Version diff --git a/build.gradle b/build.gradle index e8b6b357..4706ca6d 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'application' id 'jacoco' id 'org.cadixdev.licenser' version '0.6.1' - id 'org.graalvm.buildtools.native' + id 'org.graalvm.buildtools.native' version '0.10.2' id 'com.github.johnrengelman.shadow' version '7.1.2' } @@ -67,6 +67,12 @@ task buildInfo { } } +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + compileJava { sourceCompatibility = JavaVersion.toVersion("11") targetCompatibility = JavaVersion.toVersion("11") @@ -93,6 +99,7 @@ test { } graalvmNative { + toolchainDetection = true binaries { main { imageName = 'tw' @@ -109,14 +116,14 @@ graalvmNative { buildArgs.add('-H:+ReportExceptionStackTraces') javaLauncher = javaToolchains.launcherFor { - languageVersion = JavaLanguageVersion.of(17) + languageVersion = JavaLanguageVersion.of(21) + vendor = JvmVendorSpec.matching("Oracle Corporation") } } test { verbose = true - agent = false } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fce..e1adfb49 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index f24ee2fd..ec3c5423 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,4 +17,11 @@ pluginManagement { } } +plugins { + // required to download the toolchain (jdk) from a remote repository + // https://github.com/gradle/foojay-toolchains + // https://docs.gradle.org/current/userguide/toolchains.html#sub:download_repositories + id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0" +} + rootProject.name = 'tower-cli'