From 6f0a239260df4b9ac776830b1ac28d4b9cc079f2 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 24 Feb 2023 23:30:01 +0900 Subject: - devstandalone Signed-off-by: syeyoung --- loader/build.gradle | 20 ++++++++++++++++++-- mod/build.gradle | 7 ++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/loader/build.gradle b/loader/build.gradle index 3147317a..621dc88d 100644 --- a/loader/build.gradle +++ b/loader/build.gradle @@ -65,6 +65,9 @@ configurations { transitive = false visible = false } + unmappedMod { + visible = false + } remappedMod { visible = false } @@ -90,6 +93,7 @@ dependencies { devEnv("me.djtheredstoner:DevAuth-forge-legacy:1.1.0") + unmappedMod(project(path: ':mod', configuration: 'unmappedMod')) remappedMod(project(path: ':mod', configuration: 'remappedMod')) } @@ -134,10 +138,22 @@ tasks.named("remapJar") { tasks.assemble.dependsOn tasks.remapJar -task standaloneJar(type: Jar) { +task standaloneConsumerJar(type: Jar) { archiveClassifier = "standalone" from(zipTree(tasks.remapJar.archiveFile)) - from(configurations.remappedMod.files) + from(configurations.remappedMod.files) { + rename ".+\\.jar", "mod.jar" + } + doLast { + println(archiveFile.get().asFile) + } +} +task standaloneDevJar(type: Jar) { + archiveClassifier = "devStandalone" + from(zipTree(tasks.shadowJar.archiveFile)) + from(configurations.unmappedMod.files) { + rename ".+\\.jar", "mod.jar" + } doLast { println(archiveFile.get().asFile) } diff --git a/mod/build.gradle b/mod/build.gradle index 45537550..9a4fc57d 100644 --- a/mod/build.gradle +++ b/mod/build.gradle @@ -44,6 +44,10 @@ configurations { canBeConsumed = true canBeResolved = false } + unmappedMod { + canBeConsumed = true + canBeResolved = false + } } def devenvMod = configurations.create("devenvMod") { @@ -165,7 +169,8 @@ tasks.named("remapJar") { tasks.assemble.dependsOn tasks.remapJar artifacts { - remappedMod(tasks.shadowJar) + remappedMod(tasks.remapJar) + unmappedMod(tasks.shadowJar) } -- cgit