diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-06 15:10:29 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-06 15:10:29 -0230 |
commit | 6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a (patch) | |
tree | 7451e53ceeae3c324d83a7faba83ce80005e6f23 /build.gradle | |
download | SkyblockHud-Death-Defied-6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a.tar.gz SkyblockHud-Death-Defied-6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a.tar.bz2 SkyblockHud-Death-Defied-6d8e1e5659f64a4f9ba86d6ab5bbc8e688faf22a.zip |
Initial Commit
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..5c773c5 --- /dev/null +++ b/build.gradle @@ -0,0 +1,106 @@ +buildscript { + repositories { + jcenter() + maven { + name = "jitpack" + url = "https://jitpack.io/" + } + maven { url = "https://maven.minecraftforge.net/" } + maven { url = "https://repo.spongepowered.org/maven" } + } + dependencies { + classpath "com.github.asbyth:ForgeGradle:6f53277" + classpath 'com.github.LxGaming:MixinGradle:d75e32e' + classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0' + } +} + +apply plugin: 'java' +apply plugin: 'net.minecraftforge.gradle.forge' +apply plugin: 'org.spongepowered.mixin' +apply plugin: 'com.github.johnrengelman.shadow' + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +version = "1.13" +group= "com.thatgravyboat.skyblockhud" +archivesBaseName = "SkyBlockHud" +String mixinClassifier = "dep" + +minecraft { + version = "1.8.9-11.15.1.2318-1.8.9" + runDir = "run" + mappings = "stable_22" +} + +repositories { + jcenter() + maven { url 'https://repo.spongepowered.org/maven/' } + flatDir { + dirs 'deps' + } +} + +dependencies { + compile('org.spongepowered:mixin:0.7.11-SNAPSHOT') + annotationProcessor('org.spongepowered:mixin:0.7.11-SNAPSHOT') +} + +mixin { + add sourceSets.main, "mixins.skyblockhud.refmap.json" +} + +jar { + manifest.attributes( + 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker', + 'MixinConfigs': "mixins.skyblockhud.json", + 'FMLCorePluginContainsFMLMod': true, + "ForceLoadAsMod": true + ) +} + +shadowJar { + dependencies { + include(dependency('org.spongepowered:mixin:0.7.11-SNAPSHOT')) + } + exclude 'module-info.class' + exclude 'dummyThing' + exclude 'LICENSE.txt' + + classifier = mixinClassifier +} + +reobf { + shadowJar { + mappingType = 'SEARGE' + } +} + +build.dependsOn(shadowJar) +runClient.dependsOn(build) + +processResources + { + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + expand 'version':project.version, 'mcversion':project.minecraft.version + } + + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } + + rename '(.+_at.cfg)', 'META-INF/$1' + } +task moveResources { + doLast { + ant.move file: "${buildDir}/resources/main", + todir: "${buildDir}/classes/java" + } +} +moveResources.dependsOn processResources +classes.dependsOn moveResources
\ No newline at end of file |