-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
69 lines (54 loc) · 1.4 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
61
62
63
64
65
66
67
68
69
val kotlinx_coroutines: String by project
val kotlinx_cli: String by project
val netty: String by project
val ktor: String by project
plugins {
kotlin("jvm") version "1.9.22"
application
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
application {
mainClass = "run.MainKt"
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines")
implementation("org.jetbrains.kotlinx:kotlinx-cli:$kotlinx_cli")
implementation("io.netty:netty-all:$netty")
implementation("io.ktor:ktor-network:$ktor")
implementation("io.ktor:ktor-server-core-jvm:$ktor")
implementation("io.ktor:ktor-server-cio-jvm:$ktor")
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
tasks.named<Jar>("jar") {
manifest {
attributes["Main-Class"] = "run.MainKt"
}
}
tasks.create<Jar>("fatJar") {
group = "build"
manifest {
attributes["Main-Class"] = "run.MainKt"
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
with(tasks["jar"] as CopySpec)
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.24.0")
}
}
apply(plugin = "kotlinx-atomicfu")