From a88325d50e63847ee8728ce7786aa32901a4046d Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Fri, 13 Sep 2024 12:57:51 +0200 Subject: [PATCH] build(gradle): Build with Java 21 As fcfab20 decoupled the Java version to use for analysis of Gradle projects from the Java version running ORT, finally update the Java version from 11 / 17 to 21. See [1] for context. [1]: https://github.com/oss-review-toolkit/ort/issues/8249 Signed-off-by: Sebastian Schuberth --- docker/versions.dockerfile | 2 +- gradle.properties | 2 +- gradle/gradle-daemon-jvm.properties | 2 +- plugins/scanners/scanoss/src/main/kotlin/ScanOss.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/versions.dockerfile b/docker/versions.dockerfile index 0273e2ee6a03b..fe115ece091e3 100644 --- a/docker/versions.dockerfile +++ b/docker/versions.dockerfile @@ -10,7 +10,7 @@ ARG DART_VERSION=2.18.4 ARG DOTNET_VERSION=6.0 ARG GO_VERSION=1.23.0 ARG HASKELL_STACK_VERSION=2.13.1 -ARG JAVA_VERSION=17 +ARG JAVA_VERSION=21 ARG LICENSEE_VERSION=9.15.3 ARG NODEJS_VERSION=20.14.0 ARG NPM_VERSION=10.8.3 diff --git a/gradle.properties b/gradle.properties index 178b55e8c0d12..df27565a0a415 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,7 +26,7 @@ ksp.useKSP2 = true # The version of the JDK to use for building ORT. # Keep this aligned with `toolchainVersion` in `gradle/gradle-daemon-jvm.properties`. -javaLanguageVersion = 11 +javaLanguageVersion = 21 # The version of the SPDX license list which is used to import license texts and generate SPDX enums. Must be a valid # tag, see https://github.com/spdx/license-list-data/tags. diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties index df7882571ffb3..574deb415c56e 100644 --- a/gradle/gradle-daemon-jvm.properties +++ b/gradle/gradle-daemon-jvm.properties @@ -1,3 +1,3 @@ # The version of the JDK to use for building ORT. # Keep this aligned with `javaLanguageVersion` in `gradle.properties`. -toolchainVersion = 11 +toolchainVersion = 21 diff --git a/plugins/scanners/scanoss/src/main/kotlin/ScanOss.kt b/plugins/scanners/scanoss/src/main/kotlin/ScanOss.kt index aede5691541e9..91d6df147ba34 100644 --- a/plugins/scanners/scanoss/src/main/kotlin/ScanOss.kt +++ b/plugins/scanners/scanoss/src/main/kotlin/ScanOss.kt @@ -98,7 +98,7 @@ class ScanOss internal constructor( val result = service.scan( wfpString, context.labels["scanOssContext"], - context.labels["scanOssId"]?.toIntOrNull() ?: Thread.currentThread().id.toInt() + context.labels["scanOssId"]?.toIntOrNull() ?: Thread.currentThread().threadId().toInt() ) // Replace the anonymized UUIDs by their file paths.