189 lines
No EOL
4.2 KiB
Groovy
189 lines
No EOL
4.2 KiB
Groovy
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'
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
name 'CB Maven FS'
|
|
url "http://chickenbones.net/maven/"
|
|
}
|
|
|
|
maven {
|
|
name "IC2 Player Repo"
|
|
url "http://maven.ic2.player.to/"
|
|
}
|
|
|
|
maven {
|
|
name "Waila Mobius Repo"
|
|
url "http://mobiusstrip.eu/maven"
|
|
}
|
|
|
|
}
|
|
|
|
configurations.all {
|
|
resolutionStrategy.cacheDynamicVersionsFor 7200, 'hours'
|
|
}
|
|
|
|
// define the properties file
|
|
ext.configFile = file "build.properties"
|
|
|
|
configFile.withReader {
|
|
// read config. it shall from now on be referenced as simply config or as project.config
|
|
def prop = new Properties()
|
|
prop.load(it)
|
|
project.ext.config = new ConfigSlurper().parse prop
|
|
}
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_6
|
|
|
|
version = config.version+"-"+config.aechannel+"-"+config.build
|
|
group = config.group
|
|
archivesBaseName = config.archivesBaseName
|
|
|
|
dependencies {
|
|
|
|
compile "net.industrial-craft:industrialcraft-2:${config.ic2_version}-experimental:dev"
|
|
|
|
compile "codechicken:ForgeMultipart:${config.cb_minecraft_version}-${config.fmp_version}:dev"
|
|
compile "codechicken:CodeChickenLib:${config.cb_minecraft_version}-${config.code_chicken_lib_version}:dev"
|
|
compile "codechicken:CodeChickenCore:${config.cb_minecraft_version}-${config.code_chicken_core_version}:dev"
|
|
compile "codechicken:NotEnoughItems:${config.cb_minecraft_version}-${config.nei_version}:dev"
|
|
|
|
compile "mcp.mobius.waila:Waila:${config.waila_version}"
|
|
|
|
compile files(fileTree(dir: 'libs', includes: ['*.jar']))
|
|
// compile "com.mod-buildcraft:buildcraft:6.0.8:dev"
|
|
}
|
|
|
|
|
|
// Add Coremod Manifest
|
|
jar {
|
|
|
|
manifest {
|
|
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
|
|
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
|
}
|
|
|
|
}
|
|
|
|
compileJava {
|
|
|
|
exclude("appeng/api/integration/*")
|
|
exclude("appeng/integration/modules/helpers/dead/**")
|
|
exclude("appeng/integration/modules/dead/**")
|
|
// exclude("appeng/fmp/**")
|
|
|
|
}
|
|
|
|
minecraft {
|
|
version = config.minecraft_version + "-" + config.forge_version
|
|
|
|
replace "@version@", project.version
|
|
replace "@aechannel@", config.aechannel
|
|
|
|
runDir = "run"
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
srcDirs += 'src/main/java/'
|
|
srcDirs += 'src/api/java/'
|
|
include 'appeng/api/**'
|
|
}
|
|
|
|
resources {
|
|
srcDir 'src/main/resources/'
|
|
include "assets/appliedenergistics2/recipes/*.recipe",
|
|
"assets/appliedenergistics2/lang/*.lang",
|
|
"assets/appliedenergistics2/textures/blocks/*",
|
|
"assets/appliedenergistics2/textures/guis/*",
|
|
"assets/appliedenergistics2/textures/models/*",
|
|
"assets/appliedenergistics2/textures/items/*"
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
processResources {
|
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include 'mcmod.info'
|
|
expand 'version': project.version, 'mcversion': config.minecraft_version
|
|
}
|
|
|
|
// copy everything else, thats not the mcmod.info
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude 'mcmod.info'
|
|
}
|
|
}
|
|
|
|
task myJavadocs(type: Javadoc) {
|
|
source = sourceSets.api.java
|
|
include "appeng/api/**"
|
|
|
|
classpath = configurations.compile
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: myJavadocs) {
|
|
classifier = 'javadoc'
|
|
from 'build/docs/javadoc/'
|
|
}
|
|
|
|
task devJar(type: Jar) {
|
|
|
|
manifest {
|
|
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
|
|
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
|
}
|
|
|
|
from(sourceSets.main.output) {
|
|
include "appeng/**"
|
|
include "assets/**"
|
|
include 'mcmod.info'
|
|
}
|
|
|
|
classifier = 'dev'
|
|
}
|
|
|
|
task apiJar(type: Jar) {
|
|
|
|
from(sourceSets.api.java) {
|
|
include "appeng/api/**"
|
|
}
|
|
|
|
classifier = 'api'
|
|
|
|
}
|
|
|
|
artifacts {
|
|
archives devJar
|
|
archives apiJar
|
|
archives javadocJar
|
|
} |