Skip to content

Commit fd5f009

Browse files
committed
build stand-alone jar
1 parent 90c6adc commit fd5f009

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

build.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ tasks.test {
1919
useJUnitPlatform()
2020
}
2121

22+
application {
23+
mainClass.set("MainKt")
24+
}
25+
26+
tasks.withType<Jar> {
27+
manifest {
28+
attributes["Main-Class"] = "MainKt"
29+
}
30+
31+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
32+
33+
configurations["compileClasspath"].forEach { file: File ->
34+
from(zipTree(file.absoluteFile))
35+
}
36+
}
37+
2238
kotlin {
2339
jvmToolchain(8)
2440
}

0 commit comments

Comments
 (0)