From 47da8d8aec894f7c89cd7dd7827729f1e7d7ff94 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sun, 24 Dec 2023 15:32:12 -0500 Subject: [PATCH 1/2] Use normal jar for runClient/runServer --- build.gradle | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build.gradle b/build.gradle index 50c3291c..44787253 100644 --- a/build.gradle +++ b/build.gradle @@ -959,10 +959,6 @@ if (usesShadowedDependencies.toBoolean()) { configurations.apiElements.outgoing.artifacts.clear() configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) - tasks.named("jar", Jar) { - enabled = false - finalizedBy(tasks.shadowJar) - } tasks.named("reobfJar", ReobfuscatedJar) { inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile})) } @@ -970,11 +966,6 @@ if (usesShadowedDependencies.toBoolean()) { javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) { skip() } - for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) { - tasks.named(runTask).configure { - dependsOn("shadowJar") - } - } } ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar ext.publishableObfJar = tasks.reobfJar From 1b873daf0c6c29c31ee347ef6a34f4506103fdd8 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:55:08 -0500 Subject: [PATCH 2/2] Ensure jar has unique classifier --- build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle b/build.gradle index 44787253..ecf6b3e7 100644 --- a/build.gradle +++ b/build.gradle @@ -959,6 +959,9 @@ if (usesShadowedDependencies.toBoolean()) { configurations.apiElements.outgoing.artifacts.clear() configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) + tasks.named("jar", Jar) { + archiveClassifier.set('dev-preshadow') + } tasks.named("reobfJar", ReobfuscatedJar) { inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile})) }