Skip to content

Instantly share code, notes, and snippets.

@HellFirePvP
Created December 10, 2017 16:13
Show Gist options
  • Save HellFirePvP/7e4d67d864cab3b82f65c225396517a5 to your computer and use it in GitHub Desktop.
Save HellFirePvP/7e4d67d864cab3b82f65c225396517a5 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
version = "1.12.2-1.8.3"
group= "hellfirepvp.astralsorcery"
archivesBaseName = "astralsorcery"
minecraft {
version = "14.23.1.2560"
runDir = "run"
useDepAts = true
mappings = "snapshot_20170624"
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
compileApiJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
repositories {
maven {
// location of the maven that hosts JEI files
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
// CraftTweaker
name 'jared maven'
url "http://maven.blamejared.com/"
}
maven {
//Albedo
url 'https://repo.elytradev.com/'
}
}
dependencies {
def jei_mc_version = "1.12.1"
def jei_version = "4.7.8.91"
////JEI stuff
deobfCompile "mezz.jei:jei_${jei_mc_version}:${jei_version}"
def mc_version = "1.12"
def ct_mc_version = "MC1120"
def ct_version = "4.0.0.7"
deobfCompile "CraftTweaker2:CraftTweaker2-${ct_mc_version}-Main:${mc_version}-${ct_version}"
compile "elucent:albedo:2.0-SNAPSHOT"
}
task signMainJar(type: SignJar, dependsOn: reobfJar) {
onlyIf { // Skip the task if our secret data isn't available
project.hasProperty('keyStore')
}
if (project.hasProperty('keyStore')) { // This needs to be a path to the keystore file
keyStore = project.keyStore
alias = project.alias
storePass = project.storePass
keyPass = project.keyPass
inputFile = jar.archivePath
outputFile = jar.archivePath
}
}
build.dependsOn signMainJar
jar {
manifest {
attributes 'FMLAT': 'astralsorcery_at.cfg'
attributes 'FMLCorePlugin': "hellfirepvp.astralsorcery.core.AstralCore"
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
}
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": "1.12"
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment