From 696ed8a4226b87db6a34d44017c0569021c1f1bd Mon Sep 17 00:00:00 2001 From: dags- Date: Thu, 12 Mar 2020 13:32:08 +0000 Subject: [PATCH] publish api source jar to maven --- TerraForgedAPI/build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/TerraForgedAPI/build.gradle b/TerraForgedAPI/build.gradle index ca11376..6b7e0c7 100644 --- a/TerraForgedAPI/build.gradle +++ b/TerraForgedAPI/build.gradle @@ -32,7 +32,16 @@ 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") @@ -43,6 +52,7 @@ publishing { publications { mavenJava(MavenPublication) { artifact jar + artifact sourceJar } }