From 2b4c3d64837a9b3bb25a203974f0154b1647f316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20H=C3=A4berling?= Date: Mon, 18 Oct 2021 21:49:24 -0700 Subject: [PATCH] Add 'shadowJar' target to build runnable JAR. --- build.gradle.kts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 255f9eb..871362b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,14 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { kotlin("jvm") version "1.5.31" + id("com.github.johnrengelman.shadow") version "7.1.0" application } -group = "me.micro" -version = "1.0-SNAPSHOT" +group = "com.s13g.winston" +version = "0.1" repositories { mavenCentral() @@ -28,6 +30,12 @@ tasks.withType() { kotlinOptions.jvmTarget = "11" } +tasks.withType { + archiveBaseName.set("elgato-mqtt") + manifest.attributes["Main-Class"] = "com.s13g.sauron.SauronMainKt" + manifest.attributes["Implementation-Title"] = "Winston Sauron Daemon" +} + application { mainClass.set("MainKt") } \ No newline at end of file