diff options
Diffstat (limited to 'build.gradle.kts')
-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(".", "") |