Skip to content

Commit 18273fe

Browse files
committed
Update build.gradle.kts
1 parent a3f45fa commit 18273fe

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

build.gradle.kts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22
import java.net.URI
3+
import kotlin.collections.mutableListOf
34

45
plugins {
56
kotlin("jvm") version "1.3.50"
6-
application
7+
id("com.github.johnrengelman.shadow") version "5.1.0"
8+
java
79
}
810

911
group = "dev.reeve"
1012
version = "1.0-SNAPSHOT"
1113

12-
application {
13-
14-
mainClassName = "dev.reeve.discordintegration.MainAppKt"
15-
}
1614

1715
dependencies {
18-
implementation(kotlin("stdlib-jdk8"))
19-
implementation("no.tornado:tornadofx:1.7.17")
16+
compile(kotlin("stdlib-jdk8"))
17+
compile("no.tornado:tornadofx:1.7.17")
2018
compile("club.minnced:java-discord-rpc:2.0.2")
19+
compileClasspath("com.github.jengelman.gradle.plugins:shadow:5.1.0")
2120
}
2221

2322
repositories {
@@ -36,4 +35,17 @@ compileKotlin.kotlinOptions {
3635
val compileTestKotlin: KotlinCompile by tasks
3736
compileTestKotlin.kotlinOptions {
3837
jvmTarget = "1.8"
38+
}
39+
40+
tasks {
41+
jar {
42+
classifier = null
43+
manifest {
44+
attributes["Main-Class"] = "dev.reeve.discordrpctool.MainAppKt"
45+
}
46+
}
47+
shadowJar {
48+
minimize()
49+
configurations = mutableListOf(project.configurations.compile.get())
50+
}
3951
}

0 commit comments

Comments
 (0)