Skip to content

Commit

Permalink
Explicitly declare toolchains/make compile work consistently
Browse files Browse the repository at this point in the history
Signed-off-by: WillFP <[email protected]>
  • Loading branch information
jpenilla authored and WillFP committed Jun 18, 2024
1 parent 0ab6210 commit 98c6f64
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
33 changes: 14 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ allprojects {

repositories {
mavenCentral()
mavenLocal()
maven("https://repo.auxilor.io/repository/maven-public/")
maven("https://jitpack.io")
maven("https://jitpack.io") {
content { includeGroupByRegex("com\\.github\\..*") }
}

// SuperiorSkyblock2
maven("https://repo.bg-software.com/repository/api/")
Expand Down Expand Up @@ -159,16 +160,6 @@ allprojects {
options.encoding = "UTF-8"
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()

toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

test {
useJUnitPlatform()

Expand All @@ -181,6 +172,17 @@ allprojects {
build {
dependsOn(shadowJar)
}

withType<JavaCompile>().configureEach {
options.release = 17
}
}

java {
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
}

Expand Down Expand Up @@ -220,12 +222,5 @@ tasks {
}
}

// Root is Java 21 to support 1.20.6+, rest use Java 17
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}

group = "com.willfp"
version = findProperty("version")!!
6 changes: 2 additions & 4 deletions eco-core/core-nms/v1_20_6/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ tasks {
)
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
compileJava {
options.release = 21
}

compileKotlin {
Expand Down
6 changes: 2 additions & 4 deletions eco-core/core-nms/v1_21/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ tasks {
)
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
compileJava {
options.release = 21
}

compileKotlin {
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ pluginManagement {
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "eco"

// Core
Expand Down

0 comments on commit 98c6f64

Please sign in to comment.