From 61e8cdd87f7e01e9c9816116d73606be0c80cb49 Mon Sep 17 00:00:00 2001 From: Szymon Date: Sun, 30 Jul 2023 14:32:14 +0200 Subject: [PATCH] bump libraries' versions (1.20.x) --- build.gradle.kts | 51 +++++++++++++++----------- gradle.properties | 6 +-- src/main/resources/fabric.mod.json | 2 +- src/main/resources/tnttime.mixins.json | 1 - 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3cadc17..f1fab6f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,23 +1,26 @@ plugins { + `java-library` id("fabric-loom") id("com.modrinth.minotaur") } -version = "1.2.0" -base.archivesName = "${project.name}-$version-mc${project.minecraft}" -description = "A countdown to the detonation of Minecraft TNT." +fun p(key: String): String = properties[key] as String + +version = "1.3.0" +base.archivesName.set("${rootProject.name}-mc${p("minecraft")}") +description = "A countdown to the detonation of a TNT." repositories { - maven { url "https://jitpack.io" } - maven { url "https://maven.terraformersmc.com/releases/" } + //maven("https://jitpack.io") + //maven("https://maven.terraformersmc.com/releases/") } dependencies { - minecraft("com.mojang:minecraft:${project.minecraft}") - mappings("net.fabricmc:yarn:${project.yarn}:v2") - modImplementation("net.fabricmc:fabric-loader:${project.loader}") + minecraft("com.mojang:minecraft:${p("minecraft")}") + mappings("net.fabricmc:yarn:${p("yarn")}:v2") + modImplementation("net.fabricmc:fabric-loader:${p("loader")}") - modRuntimeOnly("com.terraformersmc:modmenu:5.0.2") + //modRuntimeOnly("com.terraformersmc:modmenu:5.0.2") //modRuntimeOnly("com.github.astei:lazydfu:0.1.3") } @@ -27,31 +30,35 @@ java { } tasks { - loom.mixin.defaultRefmapName.set("tnttime.refmap.json") compileJava { - options.encoding = "UTF-8" // Must have! - options.release.set(17) + options.encoding = "UTF-8" } + jar { - manifest.attributes("Implementation-Version": rootProject.version) from("LICENSE") { - rename { "LICENSE_${project.name}" } + rename { "LICENSE_${rootProject.name}" } } } + processResources { filteringCharset = "UTF-8" + filesMatching("fabric.mod.json") { - expand("version": version) + expand( + "version" to project.version + ) } } } modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = "tnttime" - gameVersions = ["1.19.3"] - versionName = "Tnt Time for MC 1.19.3" - versionNumber = project.version - versionType = "release" - uploadFile = remapJar + token.set(System.getenv("MODRINTH_TOKEN")) + projectId.set("tnttime") + versionNumber.set("mc$version") + + versionName.set("Tnt Time $version for 1.20 and 1.20.1") + + versionType.set("release") + gameVersions.addAll("1.20", "1.20.1") + uploadFile.set(tasks["remapJar"]) } diff --git a/gradle.properties b/gradle.properties index d153c47..77a6bdf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.jvmargs=-Xmx2G org.gradle.parallel=true org.gradle.caching=true -minecraft=1.19.3 -yarn=1.19.3+build.5 -loader=0.14.12 +minecraft=1.20.1 +yarn=1.20.1+build.10 +loader=0.14.21 diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 265e0bd..1ac190a 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -29,6 +29,6 @@ ], "depends": { "fabricloader": ">=0.14", - "minecraft": "1.19.x" + "minecraft": "1.20.x" } } diff --git a/src/main/resources/tnttime.mixins.json b/src/main/resources/tnttime.mixins.json index d4d3522..e217b25 100644 --- a/src/main/resources/tnttime.mixins.json +++ b/src/main/resources/tnttime.mixins.json @@ -1,7 +1,6 @@ { "required": true, "minVersion": "0.8", - "refmap": "tnttime.refmap.json", "package": "shateq.tnttime.mixin", "compatibilityLevel": "JAVA_17", "mixins": [],