From 9c0f0e94f7ec188aee506b3af724e710255f61e3 Mon Sep 17 00:00:00 2001 From: Kneelawk Date: Sun, 12 May 2024 01:45:28 -0700 Subject: [PATCH] Fix api artifacts getting remapped by consumers --- .../gradle/platform/PlatformExtension.kt | 4 ++- common/src/lib/resources/fabric.mod.json | 31 +++++++++++++++++++ .../{main => lib}/resources/fabric.mod.json | 0 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 common/src/lib/resources/fabric.mod.json rename fabric/src/{main => lib}/resources/fabric.mod.json (100%) diff --git a/buildSrc/src/main/kotlin/com/jozufozu/gradle/platform/PlatformExtension.kt b/buildSrc/src/main/kotlin/com/jozufozu/gradle/platform/PlatformExtension.kt index 2b5268a18..281f5eb16 100644 --- a/buildSrc/src/main/kotlin/com/jozufozu/gradle/platform/PlatformExtension.kt +++ b/buildSrc/src/main/kotlin/com/jozufozu/gradle/platform/PlatformExtension.kt @@ -75,7 +75,9 @@ open class PlatformExtension(val project: Project) { source(commonSourceSet.allJava) } named(it.processResourcesTaskName).configure { - from(commonSourceSet.resources) + from(commonSourceSet.resources) { + exclude("fabric.mod.json") + } } } } diff --git a/common/src/lib/resources/fabric.mod.json b/common/src/lib/resources/fabric.mod.json new file mode 100644 index 000000000..39c1d15f3 --- /dev/null +++ b/common/src/lib/resources/fabric.mod.json @@ -0,0 +1,31 @@ +{ + "__comment": "This is to make sure api artifacts get remapped properly", + "schemaVersion": 1, + "id": "${mod_id}", + "version": "${mod_version}", + "name": "${mod_name}", + "description": "${mod_description}", + "authors": [ + "Jozufozu", + "PepperCode1" + ], + "contact": { + "homepage": "${mod_homepage}", + "sources": "${mod_sources}", + "issues": "${mod_issues}" + }, + "license": "${mod_license}", + "icon": "logo.png", + "environment": "client", + "entrypoints": { + }, + "mixins": [ + ], + "depends": { + "minecraft": "${minecraft_semver_version_range}", + "fabric-api": "${fabric_api_version_range}" + }, + "breaks": { + "sodium": "<0.5.0" + } +} diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/lib/resources/fabric.mod.json similarity index 100% rename from fabric/src/main/resources/fabric.mod.json rename to fabric/src/lib/resources/fabric.mod.json