From dc1375fe8a3330c2384561f875afea6165cd9a78 Mon Sep 17 00:00:00 2001 From: limepotato Date: Sun, 21 Jul 2024 04:11:06 -0600 Subject: [PATCH] Distribution --- build.gradle.kts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 61ddce2..d7d5922 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,8 @@ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + plugins { kotlin("jvm") version "2.0.0" + id("com.github.johnrengelman.shadow") version "8.1.1" } group = "xyz.limepot" @@ -16,4 +19,25 @@ dependencies { kotlin { jvmToolchain(21) +} + +tasks { + build { + dependsOn(shadowJar) + } +} + +tasks { + named("shadowJar") { + mergeServiceFiles() + manifest { + attributes(mapOf("Main-Class" to "xyz.limepot.SoniaKt.MainKt")) + } + } +} + +val jar by tasks.getting(Jar::class) { + manifest { + attributes["Main-Class"] = "xyz.limepot.SoniaKt.MainKt" + } } \ No newline at end of file