-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
49 lines (40 loc) · 1.15 KB
/
build.gradle.kts
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
plugins {
kotlin("jvm") version "1.9.22"
application
id("com.peterabeles.gversion") version "1.10.2"
}
repositories {
mavenCentral()
maven { setUrl("https://jitpack.io") }
}
application.applicationName = "x2h"
tasks.withType<Jar> {
archiveFileName.set("x2h.jar")
manifest {
attributes["Main-Class"] = "X2hKt"
}
// To avoid the duplicate handling strategy error
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// To add all dependencies
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}
dependencies {
val jacksonVersion = "2.15.3"
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion")
implementation("com.github.ProjectMapK:jackson-module-kogera:2.16.1-beta11")
implementation("com.typesafe:config:1.4.3")
implementation("com.github.ajalt.clikt:clikt:4.2.2")
}
kotlin {
jvmToolchain(21)
}
gversion {
srcDir = "src/main/kotlin/"
}
tasks.compileKotlin {
dependsOn.add(tasks.createVersionFile)
}