diff --git a/CHANGELOG.md b/CHANGELOG.md index 76b607f..00c5936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -- Fix issue with not being able to launch on 1.21. +Fix dependency logic diff --git a/fabric/build.gradle b/fabric/build.gradle index f7cef2a..600ae88 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -42,7 +42,7 @@ if (System.getenv("CURSEFORGE_API_KEY") != null && System.getenv("MODRINTH_API_K displayName = "V${project.version} (Fabric ${project.minecraft_version})" changelog = rootProject.file("CHANGELOG.md").text releaseType = project.version.contains("beta") ? "beta" : "release" - gameVersions = [project.minecraft_version, *project.additional_minecraft_versions.split(",")] + gameVersions = [project.minecraft_version, *(project.additional_minecraft_versions == "" ? [] : project.additional_minecraft_versions.split(","))] gameLoaders = ["fabric", "quilt"] mainPublication tasks.remapJar @@ -95,17 +95,18 @@ publishing { } processResources { + def substitutions = [ + "version" : project.version, + "minecraft_version" : project.minimum_minecraft_version, + "fabric_api_version" : project.minimum_fabric_api_version, + "architectury_version": project.minimum_architectury_api_version + ] + filesMatching("fabric.mod.json") { - expand "version": project.version, - "minecraft_version": project.minimum_minecraft_version, - "fabric_api_version": libs.versions.fabric.api.get(), - "architectury_version": libs.versions.architectury.get() + expand substitutions } - inputs.property "version", project.version - inputs.property "minecraft_version", project.minimum_minecraft_version - inputs.property "fabric_api_version", libs.versions.fabric.api.get() - inputs.property "architectury_version", libs.versions.architectury.get() + substitutions.each { inputs.property it.key, it.value } } shadowJar { diff --git a/gradle.properties b/gradle.properties index 96a150b..717a956 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,12 @@ org.gradle.daemon=false org.gradle.parallel=true version=1.2.2+1.21.1 minecraft_version=1.21.1 + additional_minecraft_versions=1.21 minimum_minecraft_version=1.21 +minimum_architectury_api_version=13.0.6 +minimum_fabric_api_version=0.102.0+1.21 + branch=1.21.1 group=io.github.jamalam360 mod_name=JamLib diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 64f57af..a45edbb 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -48,7 +48,7 @@ if (System.getenv("CURSEFORGE_API_KEY") != null && System.getenv("MODRINTH_API_K displayName = "V${project.version} (NeoForge ${project.minecraft_version})" changelog = rootProject.file("CHANGELOG.md").text releaseType = project.version.contains("beta") ? "beta" : "release" - gameVersions = [project.minecraft_version, *project.additional_minecraft_versions.split(",")] + gameVersions = [project.minecraft_version, *(project.additional_minecraft_versions == "" ? [] : project.additional_minecraft_versions.split(","))] gameLoaders = ["neoforge"] mainPublication tasks.remapJar @@ -96,17 +96,18 @@ publishing { } processResources { + def substitutions = [ + "version" : project.version, + "minecraft_version" : project.minimum_minecraft_version, + "neoforge_version" : project.minimum_minecraft_version.substring(2), + "architectury_version": project.minimum_architectury_api_version + ] + filesMatching("META-INF/neoforge.mods.toml") { - expand "version": project.version, - "minecraft_version": project.minimum_minecraft_version, - "neoforge_version": libs.versions.neoforge.get(), - "architectury_version": libs.versions.architectury.get() + expand substitutions } - inputs.property "version", project.version - inputs.property "minecraft_version", project.minimum_minecraft_version - inputs.property "neoforge_version", libs.versions.neoforge.get() - inputs.property "architectury_version", libs.versions.architectury.get() + substitutions.each { inputs.property it.key, it.value } } shadowJar {