-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
executable file
·60 lines (47 loc) · 1.34 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
55
56
57
58
59
60
plugins {
kotlin("jvm")
kotlin("plugin.serialization")
application
}
group = "com.github.samgarasx"
version = "1.0.0"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlinxDependency("coroutines-core"))
implementation(kotlinxDependency("serialization-json"))
implementation(ktorDependency("server-netty"))
implementation(ktorDependency("server-content-negotiation"))
implementation(ktorDependency("server-cors"))
implementation(ktorDependency("server-status-pages"))
implementation(ktorDependency("serialization-kotlinx-json"))
implementation(exposedDependency("core"))
implementation(exposedDependency("jdbc"))
implementation(hikaricpDependency())
implementation(h2Dependency())
implementation(logbackDependency("classic"))
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlin {
target.compilations.all {
kotlinOptions {
jvmTarget = "11"
}
}
}
application {
mainClass.set("MainKt")
}
tasks.named<Jar>("jar") {
manifest {
attributes["Main-Class"] = application.mainClass.get()
}
from(configurations["runtimeClasspath"].map { file: File ->
if (file.isDirectory) file else zipTree(file)
})
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}