From 22b732e28d81aa3cd5d5e76691d423adc6c7200b Mon Sep 17 00:00:00 2001 From: Bawnorton Date: Mon, 9 Sep 2024 18:11:53 -0700 Subject: [PATCH] thanks gradle --- CHANGELOG.md | 6 +++++ build.gradle.kts | 24 +++++++++---------- gradle.properties | 2 +- .../1.21.1-fabric-mojmap/gradle.properties | 4 ++-- versions/1.21.1-fabric-yarn/gradle.properties | 4 ++-- .../1.21.1-neoforge-mojmap/gradle.properties | 4 ++-- .../1.21.1-neoforge-yarn/gradle.properties | 4 ++-- 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b92f8..c474d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.0.3 +- Fix build using dev names (thanks gradle) + +# 1.0.2 +- Bring down version req to 1.21 + # 1.0.1 - Prevent config screen generator from init'ing on the server - Add "description" to description translation key diff --git a/build.gradle.kts b/build.gradle.kts index 01a5882..1fa7a1c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ @file:Suppress("UnstableApiUsage") import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import net.fabricmc.loom.task.RemapJarTask plugins { `maven-publish` @@ -21,10 +22,6 @@ version = "${mod.version}-$loader-${mod.mappings}+$minecraftVersion" group = mod.group base.archivesName.set(mod.name) -stonecutter { - debug = true -} - repositories { mavenCentral() maven("https://maven.neoforged.net/releases/") @@ -54,6 +51,12 @@ tasks { options.release = 21 } + withType { + dependsOn("shadowJar") + inputFile.set(shadowJar.get().archiveFile.get()) + addNestedDependencies = true + } + withType { from(sourceSets.main.get().output) relocate("com.google.gson", "com.bawnorton.configurable.libs.gson") @@ -74,10 +77,7 @@ tasks { "pack.png", "version.json" ) - mergeServiceFiles() - - archiveClassifier = null } } @@ -90,9 +90,9 @@ java { val buildAndCollect = tasks.register("buildAndCollect") { group = "build" - from(tasks.shadowJar.get().archiveFile) + from(tasks.remapJar.get().archiveFile) into(rootProject.layout.buildDirectory.file("libs/${mod.version}")) - dependsOn("remapJar", "shadowJar") + dependsOn("remapJar") } if (stonecutter.current.isActive) { @@ -178,7 +178,7 @@ extensions.configure { } publishMods { - file = tasks.shadowJar.get().archiveFile + file = tasks.remapJar.get().archiveFile val tag = "$loader-${mod.mappings}-${mod.version}+$minecraftVersion" val branch = "main" changelog = "[Changelog](https://github.com/Bawnorton/${mod.name}/blob/$branch/CHANGELOG.md)" @@ -196,12 +196,12 @@ publishMods { modrinth { accessToken = providers.gradleProperty("MODRINTH_TOKEN") projectId = mod.modrinthProjId - minecraftVersions.addAll(mod.supportedVersions) + minecraftVersions.addAll(mod.supportedVersions.split(", ")) } curseforge { accessToken = providers.gradleProperty("CURSEFORGE_TOKEN") projectId = mod.curseforgeProjId - minecraftVersions.addAll(mod.supportedVersions) + minecraftVersions.addAll(mod.supportedVersions.split(", ")) } } diff --git a/gradle.properties b/gradle.properties index 8d19af6..50a5c7c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx4G fabric_versions=1.21.1 neoforge_versions=1.21.1 -mod_version=1.0.1 +mod_version=1.0.3 mod_group=com.bawnorton mod_id=configurable mod_name=Configurable diff --git a/versions/1.21.1-fabric-mojmap/gradle.properties b/versions/1.21.1-fabric-mojmap/gradle.properties index a9ee0b2..ab2387e 100644 --- a/versions/1.21.1-fabric-mojmap/gradle.properties +++ b/versions/1.21.1-fabric-mojmap/gradle.properties @@ -3,7 +3,7 @@ mappings=mojmap yarn_build=3 fabric_loader=0.16.2 -minecraft_dependency=>=1.21.1 -supported_versions=1.21.1 +minecraft_dependency=>=1.21 +supported_versions=1.21, 1.21.1 modmenu=11.0.2 \ No newline at end of file diff --git a/versions/1.21.1-fabric-yarn/gradle.properties b/versions/1.21.1-fabric-yarn/gradle.properties index c46a789..6ce9ab1 100644 --- a/versions/1.21.1-fabric-yarn/gradle.properties +++ b/versions/1.21.1-fabric-yarn/gradle.properties @@ -3,7 +3,7 @@ mappings=yarn yarn_build=3 fabric_loader=0.16.2 -minecraft_dependency=>=1.21.1 -supported_versions=1.21.1 +minecraft_dependency=>=1.21 +supported_versions=1.21, 1.21.1 modmenu=11.0.2 \ No newline at end of file diff --git a/versions/1.21.1-neoforge-mojmap/gradle.properties b/versions/1.21.1-neoforge-mojmap/gradle.properties index 8ee426a..0812b47 100644 --- a/versions/1.21.1-neoforge-mojmap/gradle.properties +++ b/versions/1.21.1-neoforge-mojmap/gradle.properties @@ -3,5 +3,5 @@ mappings=mojmap yarn_build=3 neoforge_loader=21.1.31 -minecraft_dependency=>=1.21.1 -supported_versions=1.21.1 \ No newline at end of file +minecraft_dependency=>=1.21 +supported_versions=1.21, 1.21.1 \ No newline at end of file diff --git a/versions/1.21.1-neoforge-yarn/gradle.properties b/versions/1.21.1-neoforge-yarn/gradle.properties index 6c21d13..d520214 100644 --- a/versions/1.21.1-neoforge-yarn/gradle.properties +++ b/versions/1.21.1-neoforge-yarn/gradle.properties @@ -3,5 +3,5 @@ mappings=yarn yarn_build=3 neoforge_loader=21.1.31 -minecraft_dependency=>=1.21.1 -supported_versions=1.21.1 \ No newline at end of file +minecraft_dependency=>=1.21 +supported_versions=1.21, 1.21.1 \ No newline at end of file