From 03719866bef952a9759a7d047e95f7e512312631 Mon Sep 17 00:00:00 2001 From: Martin Nonnenmacher Date: Tue, 12 Mar 2024 12:47:23 +0100 Subject: [PATCH] build: Set the target JVM to 11 Configure Gradle to build class files compatible with Java 11. This allows to use the published ORT artifacts also in Projects that use Java 11. Previously, Java 17 was required. The main use case for this is to be able to build the Analyzer Docker image for the ORT Server [1] with Java 11 which is required to analyze Gradle projects that are not compatible with newer Java versions. Relates to #8249. [1]: https://github.com/eclipse-apoapsis/ort-server Signed-off-by: Martin Nonnenmacher --- buildSrc/src/main/kotlin/ort-kotlin-conventions.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/ort-kotlin-conventions.gradle.kts b/buildSrc/src/main/kotlin/ort-kotlin-conventions.gradle.kts index 59f51b87ce882..8134eb6b19a5a 100644 --- a/buildSrc/src/main/kotlin/ort-kotlin-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/ort-kotlin-conventions.gradle.kts @@ -155,7 +155,7 @@ tasks.withType().configureEach detekt@{ tasks.withType().configureEach { // Align this with Kotlin to avoid errors, see https://youtrack.jetbrains.com/issue/KT-48745. sourceCompatibility = maxKotlinJvmTarget.target - targetCompatibility = maxKotlinJvmTarget.target + targetCompatibility = JvmTarget.JVM_11.target } tasks.withType().configureEach {