Skip to content

Commit

Permalink
Add 'shadowJar' target to build runnable JAR.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaeberling committed Oct 19, 2021
1 parent 5f922e6 commit 2b4c3d6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -28,6 +30,12 @@ tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "11"
}

tasks.withType<ShadowJar> {
archiveBaseName.set("elgato-mqtt")
manifest.attributes["Main-Class"] = "com.s13g.sauron.SauronMainKt"
manifest.attributes["Implementation-Title"] = "Winston Sauron Daemon"
}

application {
mainClass.set("MainKt")
}

0 comments on commit 2b4c3d6

Please sign in to comment.