From f5663397febc678bdba9126d886570f69c4269ca Mon Sep 17 00:00:00 2001 From: Sven Date: Sat, 24 Jan 2026 17:41:45 +0100 Subject: [PATCH] Add Shadow conventions plugin --- build.gradle.kts | 1 + .../kotlin/net.trueog.shadow-conventions.gradle.kts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/main/kotlin/net.trueog.shadow-conventions.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index d5404eb..870da23 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,4 +9,5 @@ repositories { dependencies { implementation("com.diffplug.spotless:spotless-plugin-gradle:8.1.0") + implementation("com.gradleup.shadow:com.gradleup.shadow.gradle.plugin:8.3.9") } \ No newline at end of file diff --git a/src/main/kotlin/net.trueog.shadow-conventions.gradle.kts b/src/main/kotlin/net.trueog.shadow-conventions.gradle.kts new file mode 100644 index 0000000..2aaf0de --- /dev/null +++ b/src/main/kotlin/net.trueog.shadow-conventions.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("com.gradleup.shadow") +} + +tasks.shadowJar { + archiveClassifier.set("") // Use empty string instead of null. + isEnableRelocation = true + relocationPrefix = "${project.group}.shadow" +} + +tasks.build { dependsOn(tasks.shadowJar) } \ No newline at end of file