TechReborn/build.gradle

201 lines
6 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 {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
apply plugin: 'forge'
apply plugin: 'maven'
apply plugin: 'maven-publish'
2015-04-10 10:43:45 +02:00
repositories {
maven {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
maven {
name "Mobius Repo"
url "http://mobiusstrip.eu/maven"
}
maven {
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
maven {
name = "Modmuss50"
url = "http://modmuss50.me/maven/"
}
maven {
name = "Qmunity"
url = "http://maven.bluepowermod.com/"
}
2015-04-10 10:43:45 +02:00
}
2015-04-10 00:17:30 +02:00
def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {
version = "0.1." + "${System.getenv().BUILD_NUMBER}"
} else {
version = "0.1.BUILD"
}
minecraft {
version = "1.7.10-10.13.3.1394-1710ls"
2015-04-10 00:17:30 +02:00
replace "@MODVERSION@", project.version
replaceIn "ModInfo.java"
replaceIn "package-info.java"
2015-04-10 00:17:30 +02:00
}
group = 'TechReborn'
task deleteOldArtifacts(type: Delete) {
delete 'build/libs'
}
classes.dependsOn deleteOldArtifacts
2015-04-17 20:42:09 +02: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 {
2015-04-17 20:42:09 +02:00
def f = new File('dep/')
if (!f.exists()) {
f.mkdirs()
}
if (!f.exists()) {
f.mkdir()
}
compile 'net.industrial-craft:industrialcraft-2:2.2.712-experimental:dev'
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.136:dev"
compile "codechicken:CodeChickenCore:1.7.10-1.0.6.+:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.4.+:dev"
compile "codechicken:ForgeMultipart:1.7.10-1.1.2.331:dev"
compile "mcp.mobius.waila:Waila:1.5.10_1.7.10:dev"
2015-04-17 19:38:03 +02:00
compile 'com.mod-buildcraft:buildcraft:6.4.8:dev'
compile "qmunity:QmunityLib:0.1.+:deobf"
2015-04-17 20:42:09 +02:00
grabDep('ThermalFoundation-[1.7.10]1.0.0-81.jar', 'http://addons-origin.cursecdn.com/files/2233/780/ThermalFoundation-[1.7.10]1.0.0-81.jar')
grabDep('CoFHCore-[1.7.10]3.0.2-262.jar', 'http://addons-origin.cursecdn.com/files/2234/198/CoFHCore-[1.7.10]3.0.2-262.jar')
grabDep('CoFHLib-[1.7.10]1.0.1-151.jar', 'http://addons-origin.cursecdn.com/files/2233/832/CoFHLib-[1.7.10]1.0.1-151.jar')
grabDep('ThermalExpansion-[1.7.10]4.0.1-182.jar', 'http://addons-origin.cursecdn.com/files/2234/200/ThermalExpansion-[1.7.10]4.0.1-182.jar')
//compile files("dep/ThermalFoundation-[1.7.10]1.0.0-81.jar", "dep/CoFHCore-[1.7.10]3.0.2-262.jar", "dep/CoFHLib-[1.7.10]1.0.1-151.jar", "dep/ThermalExpansion-[1.7.10]4.0.1-182.jar")
2015-04-10 00:17:30 +02:00
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "@MODVERSION@", project.version
2015-04-10 00:17:30 +02:00
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include '*.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
appendix = 'src'
classifier = 'src'
}
task deobfJar(type: Jar) {
from sourceSets.main.output
appendix = 'dev'
exclude "**/*.psd"
classifier = 'dev'
}
jar {
exclude "**/*.psd"
appendix = 'universal'
classifier = 'universal'
}
2015-04-26 10:07:59 +02:00
task apiJar(type: Jar) {
from(sourceSets.main.java) {
include 'techreborn/api/**'
appendix = 'api'
classifier = "api"
}
}
2015-04-26 10:07:59 +02:00
apiJar.mustRunAfter deobfJar
2015-04-10 00:17:30 +02:00
artifacts {
archives sourceJar
archives deobfJar
2015-04-26 10:07:59 +02:00
archives apiJar
2015-04-10 00:17:30 +02:00
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:///var/www/maven/")
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'
roles { role 'Gigabit101' }
}
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.3'
2015-04-10 00:17:30 +02:00
}