Skip to content

Commit 8909371

Browse files
authored
Make kscript jar executable
1 parent 5a2ffdc commit 8909371

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22

33
plugins {
44
kotlin("jvm") version "1.4.32"
5+
application
56
id("com.github.johnrengelman.shadow") version "5.2.0"
67
}
78

@@ -13,6 +14,7 @@ group = "com.github.holgerbrandl.kscript.launcher"
1314

1415
//val kotlinVersion: String by rootProject.extra
1516
val kotlinVersion: String ="1.4.32"
17+
val launcherClassName: String ="kscript.app.KscriptKt"
1618

1719
dependencies {
1820
compile("com.offbytwo:docopt:0.6.0.20150202")
@@ -41,6 +43,10 @@ val shadowJar by tasks.getting(ShadowJar::class) {
4143
}
4244
}
4345

46+
application {
47+
mainClassName = launcherClassName
48+
}
49+
4450
// Disable standard jar task to avoid building non-shadow jars
4551
val jar by tasks.getting {
4652
enabled = false

0 commit comments

Comments
 (0)