diff options
author | isXander <xander@isxander.dev> | 2024-04-15 16:54:12 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2024-04-15 16:54:12 +0100 |
commit | 8683289dfc50dc8557281222dea6c71c58fdf6c0 (patch) | |
tree | 42745ed145c5ddb3c5dccbc706d9e8ab6224eda8 /build.gradle.kts | |
parent | 2a832708391251de921a9ac215684b9fece1bbe2 (diff) | |
download | YetAnotherConfigLib-8683289dfc50dc8557281222dea6c71c58fdf6c0.tar.gz YetAnotherConfigLib-8683289dfc50dc8557281222dea6c71c58fdf6c0.tar.bz2 YetAnotherConfigLib-8683289dfc50dc8557281222dea6c71c58fdf6c0.zip |
Make sure builds are set to the correct JDK version for the minecraft target
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index f6e65e5..016ff2a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { `java-library` kotlin("jvm") version "1.9.22" @@ -194,6 +196,21 @@ machete { json.enabled.set(false) } +java { + targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_17 +} + +tasks.withType<JavaCompile> { + options.release.set(findProperty("java.version")!!.toString().toInt()) +} + +tasks.withType<KotlinCompile> { + kotlinOptions { + jvmTarget = findProperty("java.version")!!.toString() + } +} + publishMods { displayName.set("YetAnotherConfigLib $versionWithoutMC for MC $mcVersion") file.set(tasks.remapJar.get().archiveFile) @@ -248,7 +265,7 @@ publishMods { github { repository.set(githubProject) accessToken.set(findProperty("github.token")?.toString()) - //commitish.set(grgit.branch.current().name) + commitish.set(grgit.branch.current().name) } tasks.getByName("publishGithub") { |