Skip to content

Commit

Permalink
avoid gradle to download jdks automatically, and use the old source/t…
Browse files Browse the repository at this point in the history
…arget compatibility with kotlin
  • Loading branch information
lfoppiano committed Aug 30, 2024
1 parent e40e30c commit 8cc06b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 17 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8cc06b7

Please sign in to comment.