buildscript { repositories { maven { url "https://files.minecraftforge.net/maven" } jcenter() mavenCentral() } dependencies { classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "3.+", changing: true } } apply plugin: "net.minecraftforge.gradle" apply plugin: "maven-publish" apply plugin: "eclipse" version = "${mc_version}-${mod_version}" archivesBaseName = "TerraForgedAPI" repositories { jcenter() mavenCentral() } dependencies { minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" compile project(":FeatureManager") compile project(":TerraForgedCore") } minecraft { mappings channel: mcp_channel, version: mcp_version } 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") } jar { dependsOn(sourceJar) from("$buildDir/classes/java/main") from(project(":Noise2D").buildDir.getPath() + "/classes/java/main") from(project(":FeatureManager").buildDir.getPath() + "/classes/java/main") from(project(":TerraForgedCore").buildDir.getPath() + "/classes/java/main") } publishing { publications { mavenJava(MavenPublication) { artifact jar artifact sourceJar } } 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/" } } } }