diff options
author | Deftu <deftudev@gmail.com> | 2024-06-07 12:41:42 +0200 |
---|---|---|
committer | Deftu <deftudev@gmail.com> | 2024-06-07 12:41:42 +0200 |
commit | ace0a5d5fe46906157bf532b3621481e723c6270 (patch) | |
tree | e75fb0f253cca6545e8c7381162184a43a0ab9d8 | |
parent | 36abf3ad659b230d2a0e21ca7bbd20848d6c0285 (diff) | |
download | Remap-ace0a5d5fe46906157bf532b3621481e723c6270.tar.gz Remap-ace0a5d5fe46906157bf532b3621481e723c6270.tar.bz2 Remap-ace0a5d5fe46906157bf532b3621481e723c6270.zip |
Update Kotlin & cleanup build file
-rw-r--r-- | build.gradle.kts | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 48d6f77..6d37c0c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,16 +1,13 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion plugins { - kotlin("jvm") version "1.9.23" + kotlin("jvm") version("2.0.0") `maven-publish` } -tasks.withType<KotlinCompile>().configureEach { - kotlinOptions.jvmTarget = "1.8" -} - group = "dev.deftu" -version = "0.1.5" +version = "0.2.0" repositories { mavenCentral() @@ -23,6 +20,7 @@ val testB by sourceSets.creating kotlinVersion("1.5.21", isPrimaryVersion = true) kotlinVersion("1.6.20") kotlinVersion("1.9.0") +kotlinVersion("2.0.0") dependencies { api("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.21") @@ -38,6 +36,25 @@ dependencies { testRuntimeOnly("org.spongepowered:mixin:0.8.4") } +tasks { + jar { + archiveBaseName.set("remap") + } + + kotlin { + @Suppress("DEPRECATION") + compilerOptions { + jvmTarget.set(JvmTarget.JVM_1_8) + apiVersion.set(KotlinVersion.KOTLIN_1_5) + languageVersion.set(KotlinVersion.KOTLIN_1_5) + } + } + + test { + useJUnitPlatform() + } +} + tasks.named<Jar>("jar") { archiveBaseName.set("remap") } @@ -83,17 +100,6 @@ publishing { } } -tasks.test { - useJUnitPlatform() -} - -tasks.withType<KotlinCompile> { - kotlinOptions { - apiVersion = "1.5" - languageVersion = "1.5" - } -} - fun kotlinVersion(version: String, isPrimaryVersion: Boolean = false) { val name = version.replace(".", "") |