From 1aea0c558a370430166b0e59836d9d052dd3009c Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Fri, 14 Jun 2024 15:05:21 +0200 Subject: [PATCH] it's now less aggressive and sets the java toolchain version to 11 for each project instead of restricting the user to only use jdk 11 for gradle --- build.gradle.kts | 6 ++++++ settings.gradle.kts | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 96021769e..c32f1dbd5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlinx.dataframe.AnyFrame import org.jetbrains.kotlinx.dataframe.DataFrame @@ -124,6 +125,8 @@ tasks.named("dependencyUpdates").configure { } } +kotlin.jvmToolchain(11) + allprojects { tasks.withType { kotlinOptions { @@ -160,6 +163,9 @@ allprojects { } catch (_: UnknownDomainObjectException) { logger.warn("Could not set kotlinter config on :${this.name}") } + + // set the java toolchain version to 11 for all subprojects for CI stability + extensions.findByType()?.jvmToolchain(11) } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 2a016821a..43ed0bd81 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -41,7 +41,3 @@ plugins { } include("dataframe-excel") include("core") - -if (JavaVersion.current() != JavaVersion.VERSION_11) { - throw GradleException("Building this version of the Kotlin DataFrame project can only be done with Java 11.") -}