Merge pull request #2062 from EngineHub/fix/mixin-mixup

Un-mixup the mixins.
This commit is contained in:
Octavia Togami 2022-03-17 10:48:38 -07:00 committed by GitHub
commit 356cd2c8b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 10 deletions

View File

@ -39,7 +39,7 @@
"fabric-permissions-api-v0": "*"
},
"mixins": [
"worldedit.mixins.json"
"worldedit-fabric.mixins.json"
],
"accessWidener" : "worldedit.accesswidener"
}

View File

@ -57,8 +57,8 @@
}
configure<org.spongepowered.asm.gradle.plugins.MixinExtension> {
add(sourceSets["main"], "worldedit.mixins.refmap.json")
config("worldedit.mixins.json")
add(sourceSets["main"], "worldedit-forge.mixins.refmap.json")
config("worldedit-forge.mixins.json")
}
configure<BasePluginConvention> {
@ -165,7 +165,5 @@
}
}
afterEvaluate {
val reobf = extensions.getByName<NamedDomainObjectContainer<RenameJarInPlace>>("reobf")
reobf.create("shadowJar")
}

View File

@ -9,5 +9,6 @@
],
"injectors": {
"defaultRequire": 1
}
},
"refmap": "worldedit-forge.mixins.refmap.json"
}

View File

@ -13,9 +13,29 @@
project(":worldedit-forge").tasks.named("reobfShadowJar")
)
from(zipTree({remapFabric.get().archiveFile}))
from(zipTree({project(":worldedit-forge").tasks.getByName("shadowJar").outputs.files.singleFile}))
from(zipTree({project(":worldedit-forge").tasks.getByName("shadowJar").outputs.files.singleFile})) {
// Duplicated first-party files
exclude("META-INF/services/org.enginehub.piston.CommandManagerService")
exclude("lang/")
// No-brainer library excludes
exclude("com/sk89q/jchronic/")
exclude("com/sk89q/jnbt/")
exclude("com/sk89q/minecraft/")
exclude("com/sk89q/util/")
exclude("com/thoughtworks/")
exclude("net/royawesome/")
exclude("org/enginehub/piston/")
// Exclude worldedit-core
exclude {
val pathString = it.relativePath.pathString
pathString.startsWith("com/sk89q/worldedit/") && !pathString.startsWith("com/sk89q/worldedit/forge/")
}
// Questionable excludes. So far the two files from each jar are the same.
exclude("defaults/worldedit.properties")
exclude("pack.mcmeta")
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
duplicatesStrategy = DuplicatesStrategy.FAIL
archiveClassifier.set("dist")
}