Skip to content

Commit

Permalink
build: Set the target JVM to 11
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mnonnenmacher committed Mar 12, 2024
1 parent 9935f31 commit 0371986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/ort-kotlin-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ tasks.withType<Detekt>().configureEach detekt@{
tasks.withType<JavaCompile>().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<KotlinCompile>().configureEach {
Expand Down

0 comments on commit 0371986

Please sign in to comment.