2013-12-13 10:45:03 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
name = "forge"
|
|
|
|
url = "http://files.minecraftforge.net/maven"
|
|
|
|
}
|
2014-03-28 02:34:47 +01:00
|
|
|
maven {
|
|
|
|
name = "sonatype"
|
|
|
|
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
|
|
|
}
|
2013-12-13 10:45:03 +01:00
|
|
|
}
|
|
|
|
dependencies {
|
2014-04-02 01:47:39 +02:00
|
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
2013-12-13 10:45:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-28 02:34:47 +01:00
|
|
|
apply plugin: 'forge'
|
2013-12-13 10:45:03 +01:00
|
|
|
|
2014-05-26 22:03:54 +02:00
|
|
|
ext.configFile = file "build.properties"
|
|
|
|
|
|
|
|
configFile.withReader {
|
|
|
|
def prop = new Properties()
|
|
|
|
prop.load(it)
|
|
|
|
project.ext.config = new ConfigSlurper().parse prop
|
|
|
|
}
|
|
|
|
|
|
|
|
version = config.mod_version
|
2014-03-28 02:34:47 +01:00
|
|
|
group = "com.pahimar.ee3" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
2013-12-15 02:04:17 +01:00
|
|
|
archivesBaseName = "EquivalentExchange3"
|
2013-12-13 10:45:03 +01:00
|
|
|
|
|
|
|
minecraft {
|
2014-05-26 22:03:54 +02:00
|
|
|
version = config.minecraft_version + "-" + config.forge_version
|
2014-05-16 17:48:51 +02:00
|
|
|
assetDir = "run/assets"
|
2014-05-15 20:49:52 +02:00
|
|
|
|
2014-05-26 22:03:54 +02:00
|
|
|
replaceIn "reference/Reference.java"
|
|
|
|
replace "@VERSION@", config.mod_version
|
2014-05-15 20:49:52 +02:00
|
|
|
}
|
|
|
|
|
2014-05-26 22:03:54 +02:00
|
|
|
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv("BUILD_NUMBER") ?: 0}"
|
|
|
|
|
2014-03-28 02:34:47 +01:00
|
|
|
processResources
|
|
|
|
{
|
2014-05-16 17:48:51 +02:00
|
|
|
// exclude xcf files, as they are for development only
|
|
|
|
exclude '**/*.xcf'
|
|
|
|
|
2014-03-28 02:34:47 +01:00
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
2014-05-26 22:03:54 +02:00
|
|
|
include '*.info'
|
2014-03-28 02:34:47 +01:00
|
|
|
|
|
|
|
// replace version and mcversion
|
2014-05-26 22:03:54 +02:00
|
|
|
expand 'mod_version': project.version, 'minecraft_version': project.config.minecraft_version
|
2014-03-28 02:34:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// copy everything else, thats not the mcmod.info
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
2014-05-26 22:03:54 +02:00
|
|
|
include '**/*.info'
|
|
|
|
include '**/*.properties'
|
2014-03-28 02:34:47 +01:00
|
|
|
}
|
|
|
|
}
|