111 lines
2.9 KiB
Groovy
111 lines
2.9 KiB
Groovy
apply plugin: 'forge'
|
|
apply plugin: 'maven-publish'
|
|
|
|
apply from: 'gradle/scripts/dependencies.gradle'
|
|
apply from: 'gradle/scripts/artifacts.gradle'
|
|
apply from: 'gradle/scripts/autoinstallruntime.gradle'
|
|
apply from: 'gradle/scripts/integration.gradle'
|
|
apply from: 'gradle/scripts/optional.gradle'
|
|
apply from: 'gradle/scripts/maven.gradle'
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
|
|
maven {
|
|
name = "forge"
|
|
url = "http://files.minecraftforge.net/maven"
|
|
}
|
|
|
|
maven {
|
|
name = "sonatype"
|
|
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
|
|
changing = true
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
version = aeversion + "-" + aechannel + "-" + aebuild
|
|
group = aegroup
|
|
archivesBaseName = aebasename
|
|
|
|
// If TeamCity is running this build, lets set the version info
|
|
if (hasProperty("teamcity")) {
|
|
version = teamcity["build.number"]
|
|
|
|
// Fix for main branch being built
|
|
version = version.replaceAll("/", "-")
|
|
}
|
|
|
|
// Add Coremod Manifest
|
|
jar {
|
|
manifest {
|
|
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
|
|
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
|
}
|
|
|
|
// specify which files are really included, can control which APIs should be in
|
|
include "appeng/**"
|
|
include "assets/**"
|
|
include "mcmod.info"
|
|
include "pack.mcmeta"
|
|
}
|
|
|
|
minecraft {
|
|
version = minecraft_version + "-" + forge_version
|
|
|
|
replaceIn "AEConfig.java"
|
|
replaceIn "package-info.java"
|
|
|
|
replace "@version@", project.version
|
|
replace "@aeversion@", aeversion
|
|
replace "@aechannel@", aechannel
|
|
replace "@aebuild@", aebuild
|
|
|
|
// used when launching minecraft in dev env
|
|
runDir = "run"
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDirs += 'src/api/java'
|
|
srcDirs += 'src/main/java/'
|
|
}
|
|
|
|
resources {
|
|
srcDir "src/main/resources/"
|
|
include(
|
|
"assets/appliedenergistics2/recipes/**/*.recipe",
|
|
"assets/appliedenergistics2/recipes/README.html",
|
|
"assets/appliedenergistics2/lang/*.lang",
|
|
"assets/appliedenergistics2/textures/blocks/*",
|
|
"assets/appliedenergistics2/textures/guis/*",
|
|
"assets/appliedenergistics2/textures/models/*",
|
|
"assets/appliedenergistics2/textures/items/*",
|
|
"assets/appliedenergistics2/meta/*",
|
|
"mcmod.info",
|
|
"pack.mcmeta"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
inputs.property "mcversion", project.minecraft.version
|
|
|
|
filesMatching('mcmod.info') {
|
|
expand 'version':project.version, 'mcversion':project.minecraft.version
|
|
}
|
|
}
|
|
|