Add shadow jar task

This commit is contained in:
kageru 2019-07-07 10:21:24 +02:00
parent 321999e6b2
commit 85206a7fc3
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -1,12 +1,24 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.3.31"
kotlin("jvm") version "1.3.40"
id("com.github.johnrengelman.shadow") version "5.1.0" apply true
application
}
val botMainClass = "moe.kageru.kagebot.KagebotKt"
application {
mainClassName = "moe.kageru.kagebot.KagebotKt"
mainClassName = botMainClass
}
tasks.withType<Jar> {
manifest {
attributes(
mapOf(
"Main-Class" to botMainClass
)
)
}
}
group = "moe.kageru.kagebot"
@ -14,6 +26,7 @@ version = "0.1"
repositories {
mavenCentral()
jcenter()
}
val test by tasks.getting(Test::class) {