Files
2023-11-22 03:38:44 +01:00

55 lines
1.4 KiB
Groovy

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
configurations {
shadowSources
}
ext.uniVersion = version
ext.extraVersion = mixinExtrasVersion
dependencies {
shadow("io.github.llamalad7:mixinextras-common:$extraVersion")
shadowSources("io.github.llamalad7:mixinextras-common:$extraVersion:sources")
}
archivesBaseName = archivesBaseName.replace("-1.7.10", "-mixinextras-1.7.10")
version += "+${extraVersion}"
apply plugin: "com.github.johnrengelman.shadow"
shadowJar {
classifier = ''
configurations = [project.configurations.shadow]
relocate 'org.objectweb.asm', 'org.spongepowered.asm.lib'
manifest {
attributes (
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'FMLCorePluginContainsFMLMod': 'true',
'ForceLoadAsMod': 'true',
'FMLCorePlugin': 'io.github.legacymoddingmc.unimixins.mixinextras.MixinExtrasCore',
)
}
}
task("shadowSources", type: ShadowJar) {
from sourceSets.main.allSource
classifier = "sources"
configurations = [project.configurations."shadowSources"]
}
sourcesJar {
enabled = false
dependsOn shadowSources
}
jar {
enabled = false
dependsOn shadowJar
}
// ForgeGradle's reobfuscator breaks classes containing CONSTANT_InterfaceMethodRefs, which MixinExtras happens to contain
// Also obfuscation is unnecessary anyway since this module does not reference Minecraft classes
reobf.enabled = false