-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
46 lines (38 loc) · 1.07 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.21"
application
}
group = "ca.kevbot"
version = "1.0"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test-junit"))
implementation(fileTree(mapOf("dir" to "\\lib\\koma", "include" to listOf("*.jar"))))
implementation(fileTree(mapOf("dir" to "\\lib\\processing", "include" to listOf("*.jar"))))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
implementation("com.google.code.gson:gson:2.9.0")
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "16"
}
tasks.withType<Tar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType<Zip>{
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.jar {
manifest.attributes["Main-Class"] = "MainKt"
val dependencies = configurations
.runtimeClasspath
.get()
.map(::zipTree) // OR .map { zipTree(it) }
from(dependencies)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
application {
mainClass.set("MainKt")
}