mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 23:13:21 +00:00
135 lines
3.7 KiB
Groovy
135 lines
3.7 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "forge"
|
|
url = "http://files.minecraftforge.net/maven"
|
|
}
|
|
maven {
|
|
name = "sonatype"
|
|
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'forge' // adds the forge dependency
|
|
|
|
// grab buildNumber
|
|
ext.buildnumber = 0 // this will be referenced as simply project.buildnumber from now on.
|
|
|
|
if (System.getenv().BUILD_NUMBER)
|
|
project.buildnumber = System.getenv().BUILD_NUMBER
|
|
else
|
|
logger.lifecycle "SETTING BUILDNUMBER TO 0"
|
|
|
|
version = "2.0_beta"
|
|
group= "com.enderio"
|
|
archivesBaseName = "enderio" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension]
|
|
|
|
minecraft {
|
|
version = "1.7.10-10.13.0.1180"
|
|
|
|
//assetDir = "run/assets" // the place for ForgeGradle to download the assets. The assets that the launcher gets and stuff
|
|
|
|
// replacing stuff in the source
|
|
//replace '@VERSION@', project.version
|
|
//replace '@MC_VERSION@', version
|
|
//replace '@BUILD_NUMBER@', project.buildnumber
|
|
}
|
|
|
|
configurations {
|
|
compile.extendsFrom exportedCompile
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name "Mobius Repo"
|
|
url "http://mobiusstrip.eu/maven"
|
|
}
|
|
maven {
|
|
name = "chickenbones"
|
|
url = "http://chickenbones.net/maven/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
exportedCompile 'cglib:cglib-nodep:3.1'
|
|
|
|
compile "mcp.mobius.waila:Waila:1.5.3_1.7.10"
|
|
// These will be included automatically
|
|
//compile "codechicken:NotEnoughItems:1.7.10-1.0.2.31:dev"
|
|
//compile "codechicken:CodeChickenLib:1.7.10-1.1.1.95:dev"
|
|
//compile "codechicken:CodeChickenCore:1.7.10-1.0.2.11:dev"
|
|
|
|
exportedCompile 'com.mod-buildcraft:buildcraft:6.0.17:api'
|
|
}
|
|
|
|
// configure the source folders
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir 'src/main/java'
|
|
exclude '**/enderio/trigger/**'
|
|
// exclude 'some exclusion'
|
|
// include 'some inclusion'
|
|
}
|
|
resources {
|
|
srcDir 'resources'
|
|
// exclude 'some exclusion'
|
|
// include 'some inclusion'
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
// ${version} and ${mcversion} are the exact strings being replaced
|
|
expand 'version':project.version, 'mcversion':project.minecraft.version, 'buildnumber':project.buildnumber
|
|
}
|
|
|
|
// copy everything else, that's not the mcmod.info
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude 'mcmod.info'
|
|
}
|
|
}
|
|
|
|
// --------------------
|
|
// extra jar section
|
|
// -------------------
|
|
|
|
// for the benefit of the jars, we will now now add the buildnumber to the jars
|
|
project.version += '.' + project.buildnumber
|
|
|
|
// add a source jar
|
|
task sourceJar(type: Jar) {
|
|
from sourceSets.main.allSource
|
|
classifier = 'sources'
|
|
}
|
|
|
|
// because the normal output has been made to be obfuscated
|
|
task deobfJar(type: Jar) {
|
|
from sourceSets.main.output
|
|
from { configurations.exportedCompile.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
classifier = 'dev'
|
|
}
|
|
|
|
jar {
|
|
from { configurations.exportedCompile.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
}
|
|
|
|
// make sure all of these happen when we run build
|
|
build.dependsOn sourceJar, deobfJar
|