2020-02-26 00:16:30 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2020-03-04 21:56:05 +01:00
|
|
|
maven { url "https://files.minecraftforge.net/maven" }
|
2020-02-26 00:16:30 +01:00
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "3.+", changing: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: "net.minecraftforge.gradle"
|
2020-02-26 15:20:32 +01:00
|
|
|
apply plugin: "maven-publish"
|
2020-02-26 00:16:30 +01:00
|
|
|
apply plugin: "eclipse"
|
|
|
|
|
2020-02-29 00:47:50 +01:00
|
|
|
version = "${mc_version}-${mod_version}"
|
2020-02-26 00:16:30 +01:00
|
|
|
archivesBaseName = "TerraForgedAPI"
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
|
|
|
compile project(":Noise2D")
|
|
|
|
compile project(":FeatureManager")
|
|
|
|
compile project(":TerraForgedCore")
|
|
|
|
}
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
mappings channel: mcp_channel, version: mcp_version
|
2020-02-26 11:00:30 +01:00
|
|
|
}
|
|
|
|
|
2020-03-12 14:32:08 +01:00
|
|
|
task sourceJar(type: Jar) {
|
|
|
|
classifier = "sources"
|
|
|
|
from("$projectDir/src/main/java")
|
|
|
|
from(project(":Noise2D").projectDir.getPath() + "/src/main/java")
|
|
|
|
from(project(":FeatureManager").projectDir.getPath() + "/src/main/java")
|
|
|
|
from(project(":TerraForgedCore").projectDir.getPath() + "/src/main/java")
|
|
|
|
}
|
|
|
|
|
2020-02-26 15:20:32 +01:00
|
|
|
jar {
|
2020-03-12 14:32:08 +01:00
|
|
|
dependsOn(sourceJar)
|
2020-02-26 11:50:35 +01:00
|
|
|
from("$buildDir/classes/java/main")
|
2020-02-26 12:30:37 +01:00
|
|
|
from(project(":Noise2D").buildDir.getPath() + "/classes/java/main")
|
|
|
|
from(project(":FeatureManager").buildDir.getPath() + "/classes/java/main")
|
|
|
|
from(project(":TerraForgedCore").buildDir.getPath() + "/classes/java/main")
|
2020-02-26 11:50:35 +01:00
|
|
|
}
|
|
|
|
|
2020-02-26 15:20:32 +01:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
artifact jar
|
2020-03-12 14:32:08 +01:00
|
|
|
artifact sourceJar
|
2020-02-26 15:20:32 +01:00
|
|
|
}
|
|
|
|
}
|
2020-02-26 12:30:37 +01:00
|
|
|
|
2020-02-26 15:20:32 +01:00
|
|
|
if (System.getenv("MAVEN_USER") != null && System.getenv("MAVEN_PASS") != null) {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
credentials {
|
|
|
|
username System.getenv("MAVEN_USER")
|
|
|
|
password System.getenv("MAVEN_PASS")
|
|
|
|
}
|
|
|
|
name = "nexus"
|
|
|
|
url = "https://io.terraforged.com/repository/maven/"
|
2020-02-26 11:16:55 +01:00
|
|
|
}
|
2020-02-26 11:00:30 +01:00
|
|
|
}
|
|
|
|
}
|
2020-02-26 00:16:30 +01:00
|
|
|
}
|