Repository navigation
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
60 lines (51 loc) · 1.42 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
60 lines (51 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
plugins {
kotlin("jvm") version "1.9.22"
kotlin("kapt") version "1.9.22"
application
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.graalvm.buildtools.native") version "0.10.1"
}
group = "com.localdevstack"
version = "1.2.1"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
implementation("info.picocli:picocli:4.7.5")
kapt("info.picocli:picocli-codegen:4.7.5")
testImplementation(kotlin("test"))
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
}
tasks.test {
useJUnitPlatform()
// @TempDir reads java.io.tmpdir. Point it inside the project so paths
// satisfy LocalDevStackCli's CWD safety check.
val testTmp = layout.buildDirectory.dir("test-tmp").get().asFile
doFirst { testTmp.mkdirs() }
systemProperty("java.io.tmpdir", testTmp.absolutePath)
}
application {
mainClass.set("com.localdevstack.MainKt")
}
kotlin {
jvmToolchain(17)
}
tasks.shadowJar {
archiveClassifier.set("")
mergeServiceFiles()
}
graalvmNative {
binaries {
named("main") {
imageName.set("localdevstack")
mainClass.set("com.localdevstack.MainKt")
buildArgs.addAll(
"--no-fallback",
"-H:+ReportExceptionStackTraces",
"--initialize-at-build-time=kotlin",
"--initialize-at-build-time=picocli"
)
}
}
}