diff --git a/build.gradle.kts b/build.gradle.kts index f2bd9da..c4587f5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ buildscript { } plugins { - kotlin("jvm") version "1.5.0" + kotlin("jvm") version "1.5.20-M1" id("com.github.johnrengelman.shadow") version "7.0.0" apply false id("architectury-plugin") version "[3.0.100, 3.3[" id("dev.architectury.loom") version "0.7.2.110" apply false @@ -27,7 +27,12 @@ architectury { minecraft = rootProject.property("minecraft") as String } +val javaVer: String = "8" +val kotlinVer: String by rootProject +val kotlinBaseVer = kotlinVer.substring(0..2) +val mcBase: String = rootProject.architectury.minecraft.dropLast(2) val kotlinX: String = "org.jetbrains.kotlinx" + subprojects { group = rootProject.group.toString() lateinit var mappingsDep: Dependency @@ -42,9 +47,9 @@ subprojects { val shadowC by configurations.creating repositories { maven(url = "https://jitpack.io"); mavenCentral() } dependencies { - implementation("$kotlinX:kotlinx-coroutines-core:1.5.0-RC") + implementation("$kotlinX:kotlinx-coroutines-core:$kotlinBaseVer.0-RC") listOf( - "$kotlinX:kotlinx-datetime:0.2.0", + "$kotlinX:kotlinx-datetime:0.2.1", "com.typesafe:config:1.4.1", "io.github.config4k:config4k:0.4.2", "org.jetbrains:annotations:20.1.0" @@ -130,9 +135,6 @@ subprojects { } } -val javaVer: String = "8" -val kotlinVer = rootProject.property("kotlin_stdlib_version").toString() + ".0" -val mcBase: String = rootProject.architectury.minecraft.dropLast(2) allprojects { /** configurations.all { resolutionStrategy { @@ -166,7 +168,7 @@ allprojects { freeCompilerArgs = listOf("-Xjvm-default=all", "-Xlambdas=indy") jvmTarget = if (javaVer.toInt() < 10) "1.$javaVer" else javaVer languageVersion = "1.5" - apiVersion = rootProject.property("kotlin_stdlib_version").toString() + apiVersion = kotlinBaseVer } } withType(JavaCompile::class) { diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt index a069bfc..9dabcad 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/feature/Macro.kt @@ -7,8 +7,8 @@ import fr.username404.snowygui.gui.feature.ButtonInfo.Companion.Type @Ignored @ButtonInfo(Category.MACROS, kind = Type.CLICK) data class Macro( - @Expose @JvmField private val command: String, - @Expose override val title: String = command + @Expose @JvmField var command: String, + @Expose override var title: String = command ): ButtonImpl() { override fun execAction() = Minecraft.getInstance().player!!.chat("/$command") } \ No newline at end of file diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index 35e103a..1816737 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -6,7 +6,7 @@ repositories { val serializationVer: String by rootProject dependencies { forge("net.minecraftforge:forge:${rootProject.architectury.minecraft}-${rootProject.property("forge_version")}.+") - implementation("thedarkcolour:kotlinforforge:${rootProject.property("kotlinforforge")}.0") + implementation("thedarkcolour:kotlinforforge:${rootProject.property("kotlinforforge")}") implementation(project(path = ":common")) { isTransitive = false } add("developmentForge", project(path = ":common")) { isTransitive = false } shadowC("org.jetbrains.kotlinx:kotlinx-serialization-core:$serializationVer") { isTransitive = false } // Needed for kotlinx-datetime diff --git a/gradle.properties b/gradle.properties index 017188a..9ff0e55 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,8 +9,8 @@ org.gradle.vfs.watch=true minecraft=1.16.5 forge_version=36.1 -kotlinforforge=1.12 -kotlin_stdlib_version=1.5 +kotlinforforge=1.12.0 +kotlinVer=1.5.0 serializationVer=1.2.1 fabric_loader_version=0.11.3 fabric_language_kotlin=1.6.0+kotlin.1.5.0