Skip to content

Commit e45263a

Browse files
committed
[Fabric] Work around Loom jar-in-jar regression
1 parent fba8274 commit e45263a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

worldedit-fabric/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ tasks.named<ShadowJar>("shadowJar") {
9999
archiveClassifier.set("dist")
100100
// Use the JAR output, not classes, as we need jar-in-jar from loom to work properly.
101101
dependsOn(tasks.jar)
102+
val processedFabricModJson = layout.buildDirectory.file("resources/main/fabric.mod.json").get().asFile.absoluteFile
103+
eachFile {
104+
// Exclude the fabric.mod.json in the resources folder to allow the one from Fabric's jar task to be added
105+
if (path == "fabric.mod.json" && file.absoluteFile == processedFabricModJson) {
106+
exclude()
107+
}
108+
}
102109
from(zipTree(tasks.jar.flatMap { it.archiveFile }))
103110
dependencies {
104111
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")

0 commit comments

Comments
 (0)