From 25a5380166b11b605d3400e0c684dd1cbb7e4c64 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Fri, 7 May 2021 10:33:35 +0200 Subject: [PATCH] Update the kotlin libraries --- build.gradle.kts | 8 +++++--- fabric/build.gradle.kts | 2 +- fabric/src/main/resources/fabric.mod.json | 2 +- forge/build.gradle.kts | 2 +- forge/src/main/resources/META-INF/mods.toml | 2 +- gradle.properties | 4 +++- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 87ce98e..6e550b7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -78,9 +78,9 @@ subprojects { } repositories { maven(url = "https://jitpack.io") } dependencies { - implementation("$kotlinX:kotlinx-coroutines-core:1.4.0") + implementation("$kotlinX:kotlinx-coroutines-core:1.5.0-RC") listOf( - "$kotlinX:kotlinx-datetime:0.1.1", + "$kotlinX:kotlinx-datetime:0.2.0", "com.typesafe:config:1.4.1", "io.github.config4k:config4k:0.4.2" ).forEach { implementation(it); shadowC(it) { isTransitive = false } } @@ -160,7 +160,9 @@ allprojects { val modProperties = mapOf( "mod_version" to (rootProject.version as String), "minecraft_version" to mcBase, - "mod_group" to this@allprojects.group + "mod_group" to this@allprojects.group, + "fabric_kotlin" to rootProject.property("fabric_language_kotlin"), + "kotlinforforge" to rootProject.property("kotlinforforge") ) inputs.properties(modProperties) filesNotMatching(listOf("*.png")) { diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index ea96e2a..0a80e84 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { include(modApi("${Groups.FabricApi}:fabric-rendering-v1:${rootProject.property("fabric_rendering_api_version")}")!!) include(modApi("${Groups.FabricApi}:fabric-api-base:${rootProject.property("fabric_api_base_version")}")!!) include(modRuntime("${Groups.FabricApi}:fabric-resource-loader-v0:${rootProject.property("fabric_resource_loader_version")}")!!) - modImplementation(group = "net.fabricmc", name = "fabric-language-kotlin", version = "1.5.0+kotlin.1.4.31") + modImplementation(group = "net.fabricmc", name = "fabric-language-kotlin", version = rootProject.property("fabric_language_kotlin") as String) modRuntime(modCompileOnly("com.terraformersmc:modmenu:${rootProject.property("modmenu_version")}") { exclude(group = Groups.FabricApi, module = "fabric-api-base") exclude(group = Groups.FabricApi, module = "fabric-resource-loader-v0") diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index d4ddb0f..67650bd 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -32,7 +32,7 @@ ], "depends": { "fabricloader": ">=0.9.3", - "fabric-language-kotlin": ">=1.4.0+build.1", + "fabric-language-kotlin": ">=${fabric_kotlin}", "fabric-resource-loader-v0": "*", "fabric-rendering-v1": "*", "minecraft": ">=${minecraft_version}" diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index cbe5ca1..7e188a8 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -4,7 +4,7 @@ repositories { } dependencies { forge("net.minecraftforge:forge:${rootProject.architectury.minecraft}-${rootProject.property("forge_version")}.+") - implementation("thedarkcolour:kotlinforforge:1.9.0") + implementation("thedarkcolour:kotlinforforge:${rootProject.property("kotlinforforge")}.0") implementation(project(path = ":common")) { isTransitive = false } add("developmentForge", project(path = ":common")) { isTransitive = false } shadowC(project(path = ":common", configuration = "transformProductionForge")) { isTransitive = false } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index e62f234..01137f8 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader = "kotlinforforge" -loaderVersion = "[1.9,)" +loaderVersion = "[${kotlinforforge},)" issueTrackerURL = "https://gits.username404.fr/Username404-59/SnowyGUI/issues" license = "MPL-2.0" diff --git a/gradle.properties b/gradle.properties index c889eeb..36e3889 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,8 +9,10 @@ org.gradle.vfs.watch=true minecraft=1.16.5 forge_version=36.1 -kotlin_stdlib_version=1.4 +kotlinforforge=1.12 +kotlin_stdlib_version=1.5 fabric_loader_version=0.11.3 +fabric_language_kotlin=1.6.0+kotlin.1.5.0 fabric_resource_loader_version=0.2.5+059ea8667c fabric_rendering_api_version=1.1.2+346247d77c fabric_api_base_version=0.1.3+12a8474c7c