mirror of
https://github.com/LegacyModdingMC/UniMixins.git
synced 2026-11-21 12:52:16 +00:00
Fix local Mixin-based build
This commit is contained in:
1 parent
2b3b2482ed
commit
f7b7bef023
1 file changed
+15
-5
@@ -31,14 +31,24 @@ apply plugin: "com.github.johnrengelman.shadow"
|
||||
// Fabric / SpongePowered / UniMix / GTNH
|
||||
|
||||
if (mixinFlavor == "fabric" || mixinFlavor == "unimix") {
|
||||
def uniLocal = mixinFlavor == "unimix" && project.hasProperty("local")
|
||||
def uniJitpack = mixinFlavor == "unimix" && !uniLocal
|
||||
|
||||
mixinVersion = mixinFlavor == "fabric" ? "0.11.4+mixin.0.8.5" : "0.11.6+mixin.0.8.5"
|
||||
if (mixinFlavor == "unimix" && project.hasProperty("local")) {
|
||||
if (uniLocal) {
|
||||
mixinVersion += "-local"
|
||||
}
|
||||
def mixinGroup = mixinFlavor == "fabric" ? "net.fabricmc" : "com.github.legacymoddingmc"
|
||||
// For some reason, jitpack doesn't work if I have a + in the version string,
|
||||
// so UniMix doesn't actually have the +mixin.0.8.5 suffix in the maven version.
|
||||
def mixinDep = mixinFlavor == "fabric" ? "net.fabricmc:sponge-mixin:$mixinVersion" : "com.github.LegacyModdingMC:UniMix:${mixinVersion.split("\\+")[0]}"
|
||||
|
||||
// jitpack differences:
|
||||
// - domain is com instead of io (for some strange reason)
|
||||
// - we have to use _ instead of + in version string because the latter is not supported (for some strange reason)
|
||||
// - artifact id is UniMix, not sponge-mixin (this one makes sense at least)
|
||||
|
||||
def mixinGroup = mixinFlavor == "fabric" ? "net.fabricmc" : "${uniJitpack ? 'com' : 'io'}.github.legacymoddingmc"
|
||||
def mixinArtifactId = uniJitpack ? "UniMix" : "sponge-mixin"
|
||||
def mixinDepVersion = uniJitpack ? mixinVersion.replace('+', '_') : mixinVersion
|
||||
def mixinDep = "$mixinGroup:$mixinArtifactId:$mixinDepVersion"
|
||||
|
||||
mixinFlavorClassifier = "$mixinFlavor-$mixinVersion"
|
||||
|
||||
dependencies {
|
||||
|
||||
Reference in new issue
Block a user