-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
54 lines (44 loc) · 1.32 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
50
51
52
53
54
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.util.capitalizeDecapitalize.toLowerCaseAsciiOnly
plugins {
kotlin("jvm") version "2.0.0"
application
}
group = "dev.jombi"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
implementation("com.github.kwhat", "jnativehook", "2.2.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.2")
implementation("org.jsoup:jsoup:1.18.1")
}
val fatJar = task("fatJar", type = Jar::class) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveFileName.set("${project.name.toLowerCaseAsciiOnly()}.jar")
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
with(tasks.jar.get() as CopySpec)
}
tasks {
"build" {
dependsOn(fatJar)
}
}
tasks.test {
useJUnitPlatform()
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
apiVersion.set(KotlinVersion.KOTLIN_2_0)
languageVersion.set(KotlinVersion.KOTLIN_2_0)
}
}
application {
mainClass.set("MainKt")
}