TechReborn/build.gradle

204 lines
5.4 KiB
Groovy
Raw Normal View History

2015-04-10 00:17:30 +02:00
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
2015-11-23 15:37:18 +01:00
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
2015-04-10 00:17:30 +02:00
}
}
2015-11-23 15:37:18 +01:00
apply plugin: 'net.minecraftforge.gradle.forge'
2015-04-10 00:17:30 +02:00
apply plugin: 'maven'
apply plugin: 'maven-publish'
2016-02-28 18:00:27 +01:00
sourceCompatibility = 1.8
targetCompatibility = 1.8
2015-11-24 20:37:15 +01:00
2015-04-10 10:43:45 +02:00
repositories {
maven {
name = "Modmuss50"
url = "http://maven.modmuss50.me/"
}
maven {
name "TiC"
url "http://dvs1.progwml6.com/files/maven"
}
2016-02-29 12:20:40 +01:00
maven {
name = "Amadornes"
url "http://maven.amadornes.com/"
}
2015-04-10 10:43:45 +02:00
}
configurations {
shade
compile.extendsFrom shade
}
2016-03-28 22:24:09 +02:00
version = "1.0.3"
2015-12-30 18:23:45 +01:00
2015-04-10 00:17:30 +02:00
def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {
2016-03-23 20:03:23 +01:00
version = version + "." + "${System.getenv().BUILD_NUMBER}"
2015-04-10 00:17:30 +02:00
}
minecraft {
2016-03-26 17:03:23 +01:00
version = "1.9-12.16.0.1811-1.9"
2016-03-16 09:33:11 +01:00
mappings = "snapshot_20160316"
2015-04-10 00:17:30 +02:00
replace "@MODVERSION@", project.version
2016-03-16 21:50:37 +01:00
// makeObfSourceJar = false
2016-03-22 12:38:41 +01:00
useDepAts = true
2015-11-29 11:42:34 +01:00
runDir = "run"
2015-04-10 00:17:30 +02:00
}
group = 'TechReborn'
2016-02-29 12:20:40 +01:00
def grabDep(name, url){
ant.get(src: url, dest: 'dep')
file("dep/" + url.substring(url.lastIndexOf("/"))).renameTo(file("dep/" + name + ".jar"))
}
2015-04-10 00:17:30 +02:00
dependencies {
2016-02-29 12:20:40 +01:00
def f = new File('dep/')
if(f.exists()){
f.delete()
}
f.mkdirs()
if(!f.exists()){
f.mkdir()
}
2016-03-28 22:24:09 +02:00
compile 'RebornCore:RebornCore-1.9:2.0.4.+:dev'
deobfCompile "mezz.jei:jei_1.9:3.1.+"
2016-03-26 19:52:30 +01:00
deobfCompile 'MCMultiPart:MCMultiPart-experimental:1.1.0_55:universal'
2015-04-10 00:17:30 +02:00
}
2015-06-24 00:41:03 +02:00
processResources
{
2015-11-26 21:43:56 +01:00
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
2015-06-24 00:41:03 +02:00
// 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
2015-06-24 00:41:03 +02:00
}
2015-11-26 21:43:56 +01:00
// copy everything else, thats not the mcmod.info
2015-06-24 00:41:03 +02:00
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
2015-11-26 21:43:56 +01:00
2015-04-10 00:17:30 +02:00
task deobfJar(type: Jar) {
from sourceSets.main.output
exclude "**/*.psd"
classifier = 'dev'
}
jar {
exclude "**/*.psd"
classifier = 'universal'
// configurations.shade.each { dep ->
// from(project.zipTree(dep)){
// include 'ic2/api/'
// include 'forestry/api/fuels/'
// exclude 'META-INF', 'META-INF/**', '**/*.java'
// }
// }
2015-04-10 00:17:30 +02:00
}
2015-04-26 10:07:59 +02:00
task apiJar(type: Jar) {
2015-06-22 22:32:46 +02:00
from sourceSets.main.allSource
from sourceSets.main.output
include 'techreborn/api/**/*'
classifier = "api"
}
2015-04-26 10:07:59 +02:00
apiJar.mustRunAfter deobfJar
2015-04-10 00:17:30 +02:00
artifacts {
archives deobfJar
2015-04-26 10:07:59 +02:00
archives apiJar
2015-04-10 00:17:30 +02:00
}
2015-12-06 11:32:32 +01:00
build.dependsOn deobfJar, apiJar
2015-11-22 17:24:50 +01:00
2015-04-10 00:17:30 +02:00
uploadArchives {
repositories {
mavenDeployer {
2016-02-23 22:59:06 +01:00
//This is used when the build is done on a slave node
if (project.hasProperty('mavenPass'))
{
println 'Uploading to remote Maven Repo'
repository(url: "http://mavenupload.modmuss50.me/") {
authentication(userName: "buildslave", password: project.getProperty('mavenPass'))
}
}
else
{
//this is when the build is executed on the master node
println 'Uploading to local Maven Repo'
repository(url: "file:///var/www/maven/")
}
2015-04-10 00:17:30 +02:00
pom {
groupId = "TechReborn"
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'TechReborn'
url 'https://github.com/TechReborn/TechReborn'
scm {
url 'https://github.com/TechReborn/TechReborn'
connection 'scm:git:git@github.com:TechReborn/TechReborn.git'
developerConnection 'scm:git:git@github.com:TechReborn/TechReborn.git'
}
issueManagement {
system 'github'
url 'https://github.com/TechReborn/TechReborn/issues'
}
licenses {
license {
name 'License'
url 'https://raw.githubusercontent.com/TechReborn/TechReborn/master/LICENSE.md'
2015-04-10 00:17:30 +02:00
distribution 'repo'
}
}
developers {
developer {
id 'modmuss50'
name 'modmuss50'
roles { role 'developer' }
}
developer {
id 'Gigabit101'
name 'Gigabit101'
2015-10-03 15:12:30 +02:00
roles { role 'developer' }
}
2015-04-10 00:17:30 +02:00
}
}
}
}
}
}
task wrapper(type: Wrapper) {
//To update the wrapper change the version bellow then run: gradle wrapper
gradleVersion = '2.9'
2015-10-02 08:48:44 +02:00
}