diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9cd6eea6..b1755b10 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -67,8 +67,9 @@ jobs: 1.19.3 1.19.4 1.20.1 + 1.20.2 - version-resolver: exact + version-resolver: any retry-attempts: 3 retry-delay: 10000 \ No newline at end of file diff --git a/README.md b/README.md index 7a3f1eed..295ace01 100644 --- a/README.md +++ b/README.md @@ -441,10 +441,11 @@ ItemScroller 存储的配方编号,只支持 2x2 配方 - Minecraft 1.16.5 - Minecraft 1.17.1 - Minecraft 1.18.2 -- Minecraft 1.19.2 -- Minecraft 1.19.3 +- Minecraft 1.19.2 (即将终止支持) +- Minecraft 1.19.3 (即将终止支持) - Minecraft 1.19.4 -- Minecraft 1.20.1 +- Minecraft 1.20.1 (即将终止支持) +- Minecraft 1.20.2 ### 混淆映射表 diff --git a/README_EN.md b/README_EN.md index c74fd3a2..1c7be6c0 100644 --- a/README_EN.md +++ b/README_EN.md @@ -441,10 +441,11 @@ And use `preprocess` to be compatible with all versions. - Minecraft 1.16.5 - Minecraft 1.17.1 - Minecraft 1.18.2 -- Minecraft 1.19.2 -- Minecraft 1.19.3 +- Minecraft 1.19.2 (Ending support soon) +- Minecraft 1.19.3 (Ending support soon) - Minecraft 1.19.4 -- Minecraft 1.20.1 +- Minecraft 1.20.1 (Ending support soon) +- Minecraft 1.20.2 ### Mappings diff --git a/fabricWrapper/build.gradle b/fabricWrapper/build.gradle index 575d89be..b09881ce 100644 --- a/fabricWrapper/build.gradle +++ b/fabricWrapper/build.gradle @@ -1,4 +1,5 @@ import groovy.json.JsonBuilder +import groovy.json.JsonSlurper plugins { id("java-library") @@ -49,13 +50,6 @@ jar { processResources { // disable cache outputs.upToDateWhen { false } - ArrayList mc_condition = [] - ArrayList jars = [] - - fabric_subprojects.each({ - mc_condition.add("${it.minecraft_dependency}") - jars.add(["file": "META-INF/jars/${project.mod_archives_base_name}-${it.minecraft_version}-${project.version}.jar"]) - }) from("${rootDir}/icon.png") { into("assets/${project.mod_id}") @@ -63,7 +57,6 @@ processResources { filesMatching("fabric.mod.json") { expand([ - "minecraft_dependency": new JsonBuilder(mc_condition), "magiclib_dependency" : project.magiclib_dependency, "mod_description" : project.mod_description, "mod_homepage" : project.mod_homepage, @@ -71,10 +64,29 @@ processResources { "mod_license" : project.mod_license, "mod_name" : project.mod_name, "mod_version" : project.version, - "mod_sources" : project.mod_sources, - "sub_jars" : new JsonBuilder(jars).toPrettyString(), + "mod_sources" : project.mod_sources ]) } + + doLast { + ArrayList mc_condition = [] + ArrayList jars = [] + + fabric_subprojects.each({ + mc_condition.add("${it.minecraft_dependency}") + jars.add(["file": "META-INF/jars/${project.mod_archives_base_name}-${it.minecraft_version}-${project.version}.jar"]) + }) + + File file = file("build/resources/main/fabric.mod.json") + JsonSlurper slurper = new JsonSlurper() + JsonBuilder builder = new JsonBuilder(slurper.parse(file)) + builder.content.depends.minecraft = mc_condition + builder.content.jars = jars + BufferedWriter writer = file.newWriter() + writer.append(builder.toPrettyString()) + writer.flush() + writer.close() + } } java { diff --git a/fabricWrapper/src/main/resources/fabric.mod.json b/fabricWrapper/src/main/resources/fabric.mod.json index d2dc990f..26f162d2 100644 --- a/fabricWrapper/src/main/resources/fabric.mod.json +++ b/fabricWrapper/src/main/resources/fabric.mod.json @@ -33,11 +33,9 @@ }, "depends": { "magiclib": ">=${magiclib_dependency}", - "minecraft": ${minecraft_dependency}, "malilib": "*" }, "custom": { "modmenu:clientsideOnly": true - }, - "jars": ${sub_jars} + } } diff --git a/gradle.properties b/gradle.properties index d6163855..d304150f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,9 +15,9 @@ mod_version=3.2 mod_license=LGPL-3.0 # Required Libraries -# MagicLib - 0.7.384 -magiclib_dependency=0.7.384+e9e3c4a-beta -magiclib_version=0.7.384+e9e3c4a-beta +# MagicLib - 0.7.387 +magiclib_dependency=0.7.387 +magiclib_version=0.7.387 # Annotation processor -lombok_version=1.18.28 \ No newline at end of file +lombok_version=1.18.30 \ No newline at end of file diff --git a/versions/1.19.2/gradle.properties b/versions/1.19.2/gradle.properties index 7745b62d..f33353cf 100644 --- a/versions/1.19.2/gradle.properties +++ b/versions/1.19.2/gradle.properties @@ -1,6 +1,6 @@ # Development Environment minecraft_version=1.19.2 -minecraft_dependency=>1.18.2 <=1.19.2 +minecraft_dependency=1.19.2 # Compatible Libraries minihud_version=3923228 tweakeroo_version=3923075 diff --git a/versions/1.20.1/gradle.properties b/versions/1.20.1/gradle.properties index beed3914..7a21c874 100644 --- a/versions/1.20.1/gradle.properties +++ b/versions/1.20.1/gradle.properties @@ -1,6 +1,6 @@ # Development Environment minecraft_version=1.20.1 -minecraft_dependency=>1.20 <=1.20.1 +minecraft_dependency=1.20.1 # Compatible Libraries itemscroller_version=4593079 diff --git a/versions/1.20.2/gradle.properties b/versions/1.20.2/gradle.properties index e7496a5a..3160cbdc 100644 --- a/versions/1.20.2/gradle.properties +++ b/versions/1.20.2/gradle.properties @@ -1,9 +1,9 @@ # Development Environment -minecraft_version=1.20.2-pre2 -minecraft_dependency=1.20.2-beta.2 +minecraft_version=1.20.2 +minecraft_dependency=1.20.2 # Compatible Libraries -itemscroller_version=1.20.2-pre2.1 -litematica_version=1.20.2-pre2.1 -minihud_version=1.20.2-pre2.1 -tweakeroo_version=1.20.2-pre2.1 +itemscroller_version=0.16.2-nyan.6 +litematica_version=0.15.3-nyan.6 +minihud_version=0.27.0-nyan.6 +tweakeroo_version=0.17.1-nyan.6