diff options
author | makamys <makamys@outlook.com> | 2022-06-04 09:31:42 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-04 09:33:13 +0200 |
commit | 24204cfdc91a9ecc5e0012d9f256a7e72f541d64 (patch) | |
tree | 233971dbe560cb416eaa0646c7bf38853daabc1b /buildscript/forge-1.7-mixin.gradle | |
parent | b0f7f36a0b26f8ae0f6c238ae1a11f68d20efa1c (diff) | |
download | Neodymium-24204cfdc91a9ecc5e0012d9f256a7e72f541d64.tar.gz Neodymium-24204cfdc91a9ecc5e0012d9f256a7e72f541d64.tar.bz2 Neodymium-24204cfdc91a9ecc5e0012d9f256a7e72f541d64.zip |
Migrate to generic buildscript
Diffstat (limited to 'buildscript/forge-1.7-mixin.gradle')
-rw-r--r-- | buildscript/forge-1.7-mixin.gradle | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/buildscript/forge-1.7-mixin.gradle b/buildscript/forge-1.7-mixin.gradle new file mode 100644 index 0000000..fddc15b --- /dev/null +++ b/buildscript/forge-1.7-mixin.gradle @@ -0,0 +1,42 @@ +/** Applying this file in a Forge build will imbue it with the powers of Mixin. */ + +repositories { + maven { + name = 'sponge' + url = 'https://repo.spongepowered.org/maven/' + } +} + +dependencies { + embed('org.spongepowered:mixin:0.7.11-SNAPSHOT'){ + setTransitive false + } +} + +ext.outRefMapFile = "${tasks.compileJava.temporaryDir}/${project.modid}.mixin.refmap.json" + +jar { + manifest { + attributes ( + 'MixinConfigs': "${project.modid}.mixin.json", + 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker', + 'TweakOrder': 0, + + // If these two are not set, Forge will not detect the mod, it will only run the mixins + 'FMLCorePluginContainsFMLMod': 'true', + 'ForceLoadAsMod': 'true', + ) + } + + from outRefMapFile; +} + +def outSrgFile = "${tasks.compileJava.temporaryDir}/outSrg.srg" + +afterEvaluate { + tasks.compileJava.options.compilerArgs += ["-AreobfSrgFile=${tasks.reobf.srg}", "-AoutSrgFile=${outSrgFile}", "-AoutRefMapFile=${outRefMapFile}"]; +} + +reobf { + addExtraSrgFile outSrgFile +}
\ No newline at end of file |