From a1163461857b794c02638a88ebc341e6a7ea5e97 Mon Sep 17 00:00:00 2001 From: Alexander Noyle Date: Fri, 13 Mar 2026 14:57:58 -0400 Subject: [PATCH] Fix root build jar packaging for Bukkit plugin --- build.gradle.kts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 000e522..fde135e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -87,11 +87,19 @@ tasks.shadowJar { exclude("io.github.miniplaceholders.*") // Exclude the MiniPlaceholders package from being shadowed. archiveClassifier.set("") // Use empty string instead of null. minimize() + enabled = false // Root project does not produce the server-installable plugin jar. } tasks.jar { archiveClassifier.set("part") } // Applies to root jarfile only. -tasks.build { dependsOn(tasks.spotlessApply, tasks.shadowJar) } // Build depends on spotless and shadow. +val copyServerJarToRootBuildLibs by + tasks.registering(Copy::class) { + dependsOn(":assembly:shadowJar") + from(project(":assembly").layout.buildDirectory.file("libs/CraftingStore-${rootProject.version}.jar")) + into(layout.buildDirectory.dir("libs")) + } + +tasks.build { dependsOn(tasks.spotlessApply, copyServerJarToRootBuildLibs) } // Build depends on spotless and server jar copy. /* --------------------------- Javac opts ------------------------------- */ tasks.withType().configureEach { -- 2.47.3