fix(minecraft): Fix publishing of shadow relocation

This commit is contained in:
2025-12-15 20:00:25 +01:00
parent 9ca6aed347
commit 6662942c42
3 changed files with 12 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ junit = "5.12.0"
lombok = "1.18.38"
logback = "1.5.18"
mockito = "5.14.2"
shadow = "9.0.0-rc2"
shadow = "9.3.0"
slf4j = "2.0.16"
[plugins]

View File

@@ -10,4 +10,5 @@ dependencies {
implementation(pluginMarker(mcCommonLibs.plugins.fabric.loom))
implementation(pluginMarker(mcCommonLibs.plugins.jcyo))
implementation(pluginMarker(libs.plugins.lombok))
implementation(pluginMarker(libs.plugins.shadow))
}

View File

@@ -11,6 +11,7 @@ plugins {
id("de.siphalor.tweed5.expanded-sources-jar")
id("de.siphalor.jcyo")
id("io.freefair.lombok")
id("com.gradleup.shadow")
id("de.siphalor.tweed5.shadow.explicit")
id("de.siphalor.tweed5.minecraft.mod.base")
}
@@ -154,6 +155,15 @@ tasks.named<Copy>("processTestmodResources") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
shadow {
addShadowVariantIntoJavaComponent = false
}
tasks.remapJar {
dependsOn(tasks.shadowJar)
inputFile = tasks.shadowJar.get().archiveFile
}
fun getMcCatalogVersion(name: String): String {
return mcCatalog.findVersion(name).get().requiredVersion
}