2020-02-28 23:25:38 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
|
|
|
maven { url "https://files.minecraftforge.net/maven" }
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "3.+", changing: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: "net.minecraftforge.gradle"
|
|
|
|
apply plugin: "maven-publish"
|
|
|
|
apply plugin: "eclipse"
|
|
|
|
|
2020-02-29 00:47:50 +01:00
|
|
|
version = "${mc_version}-${mod_version}${getClassifier()}"
|
2020-02-28 23:25:38 +01:00
|
|
|
archivesBaseName = "TerraForged"
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
|
|
|
compile project(":Noise2D")
|
2020-05-10 01:48:32 +02:00
|
|
|
compile(project(":TerraForgedCore")) { transitive false }
|
|
|
|
compile(project(":FeatureManager")) { transitive false }
|
|
|
|
compile(project(":TerraForgedAPI")) { transitive false }
|
2020-02-28 23:25:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
mappings channel: mcp_channel, version: mcp_version
|
|
|
|
runs {
|
|
|
|
client {
|
|
|
|
workingDirectory project.file("run/client")
|
|
|
|
property "forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP"
|
|
|
|
property "forge.logging.console.level", "debug"
|
2020-04-02 23:11:45 +02:00
|
|
|
jvmArgs "-Xmx8G", "-Xms6G", "-Ddev"
|
2020-02-28 23:25:38 +01:00
|
|
|
mods {
|
|
|
|
terraforged {
|
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
server {
|
|
|
|
workingDirectory project.file("run/server")
|
|
|
|
property "forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP"
|
|
|
|
property "forge.logging.console.level", "debug"
|
|
|
|
jvmArgs "-Xmx8G", "-Xms6G", "-Ddev"
|
|
|
|
mods {
|
|
|
|
terraforged {
|
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task collectClasses(type: Copy) {
|
2020-05-10 01:48:32 +02:00
|
|
|
configurations.collectMany { it.allDependencies }.findAll { it instanceof ProjectDependency }.each {
|
2020-02-28 23:25:38 +01:00
|
|
|
ProjectDependency project = (ProjectDependency) it
|
|
|
|
from("$project.dependencyProject.buildDir/classes/java/main")
|
|
|
|
}
|
|
|
|
into("build/classes/java/main")
|
|
|
|
}
|
|
|
|
|
|
|
|
task collectResources(type: Copy) {
|
2020-05-10 01:48:32 +02:00
|
|
|
configurations.collectMany { it.allDependencies }.findAll { it instanceof ProjectDependency }.each {
|
2020-02-28 23:25:38 +01:00
|
|
|
ProjectDependency project = (ProjectDependency) it
|
|
|
|
from("$project.dependencyProject.buildDir/resources/main")
|
|
|
|
}
|
|
|
|
into("build/resources/main")
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
dependsOn(collectResources)
|
|
|
|
filesMatching("**/mods.toml") {
|
|
|
|
expand(
|
2020-02-29 00:47:50 +01:00
|
|
|
"version": "${mod_version}${getClassifier()}",
|
2020-02-28 23:25:38 +01:00
|
|
|
"mc_version": mc_version
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
classes {
|
|
|
|
dependsOn(collectClasses)
|
|
|
|
}
|
|
|
|
|
|
|
|
publish {
|
|
|
|
dependsOn("reobfJar")
|
|
|
|
}
|
|
|
|
|
2020-02-28 23:54:39 +01:00
|
|
|
static def getClassifier() {
|
2020-02-29 00:47:50 +01:00
|
|
|
if (System.getenv("GIT_TAG_NAME") != null) {
|
|
|
|
return ""
|
2020-02-28 23:54:39 +01:00
|
|
|
}
|
2020-02-28 23:25:38 +01:00
|
|
|
def buildNumber = System.getenv("BUILD_NUMBER")
|
2020-02-28 23:54:39 +01:00
|
|
|
if (buildNumber != null) {
|
|
|
|
return "-${buildNumber}"
|
2020-02-28 23:25:38 +01:00
|
|
|
}
|
2020-02-28 23:54:39 +01:00
|
|
|
return ""
|
2020-02-28 23:25:38 +01:00
|
|
|
}
|