Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- repositories {
- jcenter()
- maven {
- name = "forge"
- url = "http://files.minecraftforge.net/maven"
- }
- maven {
- name = 'SpongePowered'
- url = 'http://repo.spongepowered.org/maven'
- }
- }
- dependencies {
- classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
- classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT'
- classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
- }
- }
- apply plugin: "net.minecraftforge.gradle.forge"
- apply plugin: 'org.spongepowered.mixin'
- apply plugin: 'com.github.johnrengelman.shadow'
- version = "1.2-ASM-14"
- group = "friedrichlp.tsc"
- archivesBaseName = "tsc"
- minecraft {
- version = "1.12.2-14.23.5.2808"
- runDir = "run"
- mappings = "snapshot_20171003"
- coreMod = "friedrichlp.tsc.asm.mixins.MixinLoaderForge"
- }
- repositories {
- mavenLocal()
- maven {
- name = 'spongepowered-repo'
- url = 'http://repo.spongepowered.org/maven/'
- }
- mavenCentral()
- }
- configurations {
- // 'shadowCompile' and 'shadowRuntime' are like 'compile' and 'runtime', except they are included in the shadow jar.
- shadowCompile
- shadowRuntime.extendsFrom(shadowCompile)
- compile.extendsFrom(shadowCompile)
- runtime.extendsFrom(shadowRuntime)
- }
- dependencies {
- // mixin needs to be distributed with the mod, very important
- shadowCompile 'org.spongepowered:mixin:0.7.10-SNAPSHOT'
- compile files(
- 'libraries/ImmersiveRailroading-1.5.0_1.12-402.jar',
- 'libraries/harvestcraft.jar',
- 'libraries/Pastebin-0.2.1.jar',
- 'libraries/ImmersiveEngineering-0.12-88.jar',
- 'libraries/TrackAPI-1.1_1.12.jar',
- 'libraries/Decocraft-2.6.2_1.12.2.jar',
- 'libraries/OpenComputers-MC1.12.2-1.7.4.153.jar',
- 'libraries/ProjectRed-1.12.2-4.9.1.92-Base.jar',
- 'libraries/ProjectRed-1.12.2-4.9.1.92-integration.jar',
- 'libraries/ForgeMultipart-1.12.2-2.6.1.81-universal.jar',
- 'libraries/CodeChickenLib-1.12.2-3.2.2.353-universal.jar',
- 'libraries/ChickenASM-1.12-1.0.2.7.jar',
- 'libraries/MrTJPCore-1.12.2-2.1.3.35-universal.jar',
- 'libraries/PTRLib-1.0.3.jar'
- )
- }
- processResources {
- // this will ensure that this task is redone when the versions change.
- inputs.property "version", project.version
- inputs.property "mcversion", project.minecraft.version
- // replace stuff in mcmod.info, nothing else
- from(sourceSets.main.resources.srcDirs) {
- include "mcmod.info"
- // replace version and mcversion
- expand "version": project.version, "mcversion": project.minecraft.version
- }
- // copy everything else, thats not the mcmod.info
- from(sourceSets.main.resources.srcDirs) {
- exclude "mcmod.info"
- }
- }
- mixin {
- defaultObfuscationEnv searge
- add sourceSets.main, "mixins.tsc.refmap.json"
- }
- shadowJar {
- classifier = 'dist'
- configurations = [project.configurations.shadowRuntime]
- }
- build.dependsOn(shadowJar)
- jar {
- manifest {
- attributes(
- "MixinConfigs": 'mixins.tsc.json',
- "tweakClass": 'org.spongepowered.asm.launch.MixinTweaker',
- "TweakOrder": 0,
- 'FMLCorePluginContainsFMLMod': 'true',
- 'FMLCorePlugin': 'friedrichlp.tsc.asm.mixins.MixinLoaderForge',
- 'ForceLoadAsMod': 'true'
- )
- }
- }
- sourceCompatibility = targetCompatibility = "1.8"
- task signJar(type: SignJar, dependsOn: shadowJar) {
- onlyIf { // Skip the task if our secret data isn't available
- project.hasProperty('keyStore')
- }
- if (project.hasProperty('keyStore')) {
- keyStore = project.findProperty('keyStore')
- alias = project.findProperty('keyStoreAlias')
- storePass = project.findProperty('keyStorePass')
- keyPass = project.findProperty('keyStoreKeyPass')
- inputFile = shadowJar.archivePath
- outputFile = shadowJar.archivePath
- }
- }
- build.dependsOn signJar
Advertisement
Add Comment
Please, Sign In to add comment