TechReborn/build.gradle

236 lines
6.9 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://maven.modmuss50.me/"
}
maven {
name = "Qmunity"
url = "http://maven.bluepowermod.com/"
}
2015-06-08 18:41:41 +02:00
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
maven {
name "TiC"
url "http://dvs1.progwml6.com/files/maven"
}
ivy {
name = 'ThaumCraft 4 API'
artifactPattern 'https://dl.dropboxusercontent.com/u/47135879/[module](-[classifier])-1.7.10-[revision](.[ext])'
}
ivy {
name "MineTweaker3"
artifactPattern "http://minetweaker3.powerofbytes.com/download/[module]-[classifier]-[revision].[ext]"
}
2015-04-10 10:43:45 +02:00
}
configurations {
shade
compile.extendsFrom shade
}
2015-04-10 00:17:30 +02:00
def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {
2015-11-02 22:22:52 +01:00
version = "0.5.6." + "${System.getenv().BUILD_NUMBER}"
2015-04-10 00:17:30 +02:00
} else {
2015-11-02 22:22:52 +01:00
version = "0.5.6.BUILD"
2015-04-10 00:17:30 +02:00
}
minecraft {
version = "1.7.10-10.13.4.1448-1.7.10"
2015-04-10 00:17:30 +02:00
replace "@MODVERSION@", project.version
}
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()
}
2015-10-17 21:21:43 +02:00
compile 'net.industrial-craft:industrialcraft-2:2.2.782-experimental:dev'
shade 'net.industrial-craft:industrialcraft-2:2.2.782-experimental:api'
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.2.0.345:dev"
compile "mcp.mobius.waila:Waila:1.5.10_1.7.10:dev"
2015-09-28 21:00:39 +02:00
compile name: 'buildcraft', version: '7.0.25', classifier: "dev", ext: 'jar'
compile "qmunity:QmunityLib:0.2.+:deobf"
2015-09-28 21:00:39 +02:00
compile "com.pahimar.ee3:EquivalentExchange3:1.7.10-0.3.507:dev"
compile "net.sengir.forestry:forestry_1.7.10:4.0.5.33:dev"
shade "net.sengir.forestry:forestry_1.7.10:4.0.5.33:api"
compile "tconstruct:TConstruct:1.7.10-1.8.5.build958:deobf"
2015-06-10 21:00:27 +02:00
compile "mods.natura:natura:1.7.10-98.6a6cca1:deobf"
compile "mantle:Mantle:1.7.10-0.3.2.jenkins187:deobf"
compile "com.github.glitchfiend.biomesoplenty:BiomesOPlenty:1.7.10-2.1.0.1396:deobf"
compile 'Azanor:Thaumcraft:4.2.3.5:deobf@jar'
compile "com.github.azanor:baubles:1.0.1.10:deobf@jar"
compile name: "MineTweaker3", version: "1.7.10-3.0.9C", classifier: "Dev"
2015-09-29 09:17:24 +02:00
shade 'IC2-Classic-API-STANDALONE:IC2-Classic-API-STANDALONE:1.1.0.19-5:api'
2015-09-28 21:30:24 +02:00
testCompile 'junit:junit:4.12'
2015-04-10 00:17:30 +02:00
}
2015-06-24 00:41:03 +02:00
processResources
{
// 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
2015-06-24 00:41:03 +02:00
}
// copy everything else, that's not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
2015-04-10 00:17:30 +02:00
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'src'
}
task deobfJar(type: Jar) {
from sourceSets.main.output
exclude "**/*.psd"
classifier = 'dev'
}
jar {
manifest {
attributes 'FMLCorePlugin': 'techreborn.asm.LoadingPlugin'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
2015-04-10 00:17:30 +02:00
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 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'
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
2015-10-22 19:40:29 +02:00
gradleVersion = '2.8'
2015-10-02 08:48:44 +02:00
}