resonant-induction/build.gradle

150 lines
4.2 KiB
Groovy
Raw Normal View History

2013-12-26 16:16:28 +01:00
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
2014-02-26 09:04:18 +01:00
dependencies {
2014-03-12 10:26:06 +01:00
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
2014-02-26 09:04:18 +01:00
}
}
2014-02-26 09:54:42 +01:00
2014-05-17 15:36:58 +02:00
apply plugin: 'idea'
2014-02-26 09:04:18 +01:00
apply plugin: 'forge'
apply plugin: 'scala'
2014-03-12 10:26:06 +01:00
apply plugin: 'maven'
2014-02-26 09:04:18 +01:00
apply plugin: 'maven-publish'
ext.buildProps = file "build.properties"
2014-03-12 10:26:06 +01:00
2014-02-26 09:04:18 +01:00
buildProps.withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
2014-03-12 10:26:06 +01:00
2014-02-26 09:26:14 +01:00
group = "resonantinduction"
archivesBaseName = "${System.getenv().JOB_NAME}"
2014-03-12 10:26:06 +01:00
2014-02-26 09:04:18 +01:00
minecraft {
2014-03-12 10:26:06 +01:00
version = "${rootProject.config.version.minecraft}-${rootProject.config.version.forge}"
replaceIn "Reference.java"
replace "@MAJOR@", rootProject.config.version.mod.major
replace "@MINOR@", rootProject.config.version.mod.minor
replace "@REVIS@", rootProject.config.version.mod.revis
replace "@BUILD@", "${System.getenv().BUILD_NUMBER}"
2014-02-26 09:04:18 +01:00
}
2014-03-12 10:26:06 +01:00
subprojects*.apply plugin: 'java'
subprojects*.apply plugin: 'scala'
2014-02-26 09:04:18 +01:00
2014-03-12 10:26:06 +01:00
allprojects {
version = "${config.version.mod.major}.${config.version.mod.minor}.${config.version.mod.revis}"
if (System.getenv("BUILD_NUMBER") != null)
version += ".${System.getenv("BUILD_NUMBER")}"
repositories {
maven {
name 'Calclavia Maven'
url 'http://calclavia.com/maven'
}
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
ivy {
name 'FMP'
artifactPattern "http://files.minecraftforge.net/[module]/[module]-dev-[revision].[ext]"
}
ivy {
artifactPattern "http://www.chickenbones.craftsaddle.org/Files/New_Versions/1.6.4/[module]-dev%20[revision].[ext]"
}
mavenCentral()
}
dependencies {
compile group: 'universalelectricity', name: 'Universal-Electricity', version: "${rootProject.config.version.universalelectricity}", classifier: "dev"
compile group: 'resonant-engine-development', name: 'resonant-engine', version: "${config.version.resonantengine}", classifier: "dev"
compile name: 'CodeChickenLib', version: "${config.version.minecraft}-${config.version.cclib}", ext: 'jar'
2014-03-12 10:26:06 +01:00
compile name: 'ForgeMultipart', version: "${config.version.minecraft}-${config.version.fmp}", ext: 'jar'
compile name: 'NotEnoughItems', version: "${config.version.nei}", ext: 'jar'
compile name: 'CodeChickenCore', version: "${config.version.cccore}", ext: 'jar'
}
jar {
classifier = project.name
dependsOn ":copyBuildXml"
destinationDir = file (rootProject.getRootDir().getPath() + '/output')
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://var/www/maven"
}
}
}
}
subprojects {
2014-04-26 22:36:05 +02:00
archivesBaseName = "${System.getenv().JOB_NAME}"
2014-04-26 23:08:06 +02:00
sourceSets.main.compileClasspath += rootProject.sourceSets.api.output
2014-03-12 10:26:06 +01:00
dependencies {
compile rootProject
}
rootProject.tasks.reobf {
reobf(tasks.jar) { spec ->
spec.classpath = sourceSets.main.compileClasspath
}
}
}
2014-02-26 09:04:18 +01:00
2014-01-05 10:47:35 +01:00
processResources {
from 'build.properties'
}
2014-03-12 10:26:06 +01:00
2013-12-26 16:16:28 +01:00
task copyBuildXml(type: Copy) {
from 'build.properties'
into 'output'
}
2014-03-12 10:26:06 +01:00
2014-01-06 15:25:27 +01:00
task apiZip(type: Zip) {
classifier = 'api'
from sourceSets*.allSource
2014-02-26 09:26:14 +01:00
include 'resonantinduction/api/**'
2014-01-06 15:25:27 +01:00
destinationDir = file 'output'
}
2014-04-26 22:47:28 +02:00
2014-01-06 15:25:27 +01:00
artifacts {
archives apiZip
}
import net.minecraftforge.gradle.tasks.dev.ChangelogTask
import net.minecraftforge.gradle.common.Constants
import net.minecraftforge.gradle.delayed.*
task createChangelog(type: ChangelogTask) {
def jobName = "${System.getenv().JOB_NAME}"
def buildNumber = "${System.getenv().BUILD_NUMBER}"
2014-03-12 10:26:06 +01:00
setServerRoot(new DelayedString(project, 'http://ci.calclavia.com/'))
setJobName(new DelayedString(project, jobName.toString()));
setAuthName(new DelayedString(project, 'console_script'));
setAuthPassword(new DelayedString(project, '625d2ac53190be3422faa0c474fb299b'));
setTargetBuild({buildNumber.toString()});
setOutput(new DelayedFile(project, 'output/' + jobName + "-${project.version}" + '-changelog' + '.txt'));
}
2014-03-12 10:26:06 +01:00
build.dependsOn "apiZip", "copyBuildXml", "createChangelog"