create fat api jar

This commit is contained in:
dags- 2020-02-26 10:50:35 +00:00
parent e26af22ef4
commit d5f2115506
3 changed files with 20 additions and 11 deletions

View File

@ -32,7 +32,24 @@ minecraft {
mappings channel: mcp_channel, version: mcp_version mappings channel: mcp_channel, version: mcp_version
} }
task deobfApiJar(type: Jar) {
duplicatesStrategy = "EXCLUDE"
from("$buildDir/classes/java/main")
from(fileTree(project(":Noise2D").buildDir.getPath() + "/classes/java/main"))
from(fileTree(project(":FeatureManager").buildDir.getPath() + "/classes/java/main"))
from(fileTree(project(":TerraForgedCore").buildDir.getPath() + "/classes/java/main"))
}
jar {
enabled(false)
}
install {
dependsOn(deobfApiJar)
}
uploadArchives { uploadArchives {
dependsOn(deobfApiJar)
repositories { repositories {
mavenDeployer { mavenDeployer {
repository(url: "https://io.terraforged.com/repository/maven/") { repository(url: "https://io.terraforged.com/repository/maven/") {

@ -1 +1 @@
Subproject commit e0129220f77b071cce27bfb37ef8103e1a194230 Subproject commit 2e18fe66d631773288b1e27db0246514ce74d681

View File

@ -1,15 +1,7 @@
allprojects { allprojects {
apply plugin: "java" apply plugin: "java"
group = "com.terraforged" group = "com.terraforged"
version = "${version}${getBuildNumber()}" version = "${version}"
} }
jar.enabled(false) jar.enabled(false)
static def getBuildNumber() {
def buildNumber = System.getenv("BUILD_NUMBER")
if (buildNumber == null) {
return ""
}
return "-${buildNumber}"
}