electrodynamics/build.gradle

131 lines
3.3 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"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
}
}
2013-12-26 16:16:28 +01:00
apply plugin: 'forge'
apply plugin: 'maven-publish'
sourceSets {
main {
java {
include 'archaic/src/main/java/**'
include 'electrical/src/main/java/**'
include 'mechanical/src/main/java/**'
}
}
}
2013-12-26 16:16:28 +01:00
ext.buildProps = file "build.properties"
2013-12-26 16:16:28 +01:00
buildProps.withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
version = "${config.version.mod.major}.${config.version.mod.minor}.${config.version.mod.revis}"
group = "resonantinduction"
2014-01-05 10:47:35 +01:00
archivesBaseName = "Resonant-Induction"
2013-12-26 16:16:28 +01:00
minecraft {
version = "${config.version.minecraft}-${config.version.forge}"
2014-01-06 15:25:27 +01:00
replaceIn "Reference.java"
replace "@MAJOR@", config.version.mod.major
replace "@MINOR@", config.version.mod.minor
replace "@REVIS@", config.version.mod.revis
replace "@BUILD@", System.getenv("BUILD_NUMBER")
2014-02-13 05:42:56 +01:00
}
if (System.getenv("BUILD_NUMBER") != null)
version += ".${System.getenv("BUILD_NUMBER")}"
2014-01-05 10:47:35 +01:00
processResources {
from 'build.properties'
}
2013-12-26 16:16:28 +01:00
task copyBuildXml(type: Copy) {
from 'build.properties'
into 'output'
}
2014-01-06 15:25:27 +01:00
task apiZip(type: Zip) {
classifier = 'api'
from sourceSets*.allSource
include 'resonantinduction/api/**'
destinationDir = file 'output'
}
2014-01-06 15:25:27 +01:00
artifacts {
archives apiZip
}
jar {
dependsOn copyBuildXml
classifier = ''
destinationDir = file 'output'
2013-12-26 16:16:28 +01:00
}
2014-02-13 05:42:56 +01:00
repositories {
maven {
name 'Calclavia Maven'
url 'http://calclavia.com/maven'
}
ivy {
name 'CB FS'
artifactPattern "http://files.minecraftforge.net/[module]/[module]-dev-[revision].[ext]"
}
}
dependencies {
compile group: 'universalelectricity', name: 'Universal-Electricity', version: "${config.version.universalelectricity}", classifier: "dev"
compile group: 'calclaviacore', name: 'calclavia-core', version: "${config.version.calclaviacore}", classifier: "dev"
compile name: 'CodeChickenLib', version: "${config.version.minecraft}-${config.version.cclib}", ext: 'jar'
compile name: 'ForgeMultipart', version: "${config.version.minecraft}-${config.version.fmp}", ext: 'jar'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
2014-02-18 04:24:40 +01:00
/*artifact apiZip*/
artifact {
file 'output/build.properties'
}
}
}
repositories {
maven {
url "file://var/www/maven"
}
}
}
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}"
jobName.replaceAll(' ','%20')
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'));
}
build.dependsOn "createChangelog"