From 8cc06b70c85264e8a243d530c9089ee8ce130850 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Fri, 30 Aug 2024 17:38:46 +0200 Subject: [PATCH] avoid gradle to download jdks automatically, and use the old source/target compatibility with kotlin --- build.gradle | 26 +++++++++++++++++--------- gradle.properties | 2 ++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 8c716c69c0..c94aa3d939 100644 --- a/build.gradle +++ b/build.gradle @@ -60,18 +60,25 @@ subprojects { } } -// sourceCompatibility = 1.11 -// targetCompatibility = 1.11 + sourceCompatibility = 1.11 + targetCompatibility = 1.11 - kotlin { - jvmToolchain(11) + tasks.withType(KotlinCompile).configureEach { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } - java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } - } +// kotlin { +// jvmToolchain(11) +// } + +// java { +// toolchain { +// languageVersion.set(JavaLanguageVersion.of(11)) +// vendor.set(JvmVendorSpec.ADOPTIUM) +// +// } +// } repositories { mavenCentral() @@ -316,6 +323,7 @@ project("grobid-home") { } import org.apache.tools.ant.taskdefs.condition.Os +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile project(":grobid-service") { apply plugin: 'application' diff --git a/gradle.properties b/gradle.properties index 7b3c318651..67c6121e23 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,3 +10,5 @@ org.gradle.vfs.watch = true #systemProp.https.proxyPort= #systemProp.https.proxyHost= #systemProp.https.proxyPort= + +org.gradle.java.installations.auto-download=false