-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
104 lines (82 loc) · 3.78 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
mavenCentral()
}
}
val kotlinVersion = "2.0.0"
val ktorVersion = "2.3.11"
val logbackVersion = "1.5.0"
val exposedVersion = "0.52.0"
val serializationVersion = "1.7.0"
val cronutilsVersion = "9.2.0"
val semverVersion = "1.4.2"
val kordVersion = "0.14.0"
plugins {
kotlin("jvm") version "2.0.0"
kotlin("plugin.serialization") version "2.0.0"
}
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:$serializationVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$serializationVersion")
implementation("com.cronutils:cron-utils:$cronutilsVersion")
implementation("io.github.z4kn4fein:semver:$semverVersion")
implementation("io.github.classgraph:classgraph:4.8.147")
implementation("io.sentry:sentry:6.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-json:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-java-time:$exposedVersion")
implementation("com.zaxxer:HikariCP:5.1.0")
implementation("org.postgresql:postgresql:42.7.3")
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-netty-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-websockets-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-html-builder-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.ktor:ktor-network-tls-certificates-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-auth-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-auth-jwt-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-sessions-jvm:$ktorVersion")
implementation("io.ktor:ktor-server-auto-head-response:$ktorVersion")
implementation("io.ktor:ktor-server-status-pages:$ktorVersion")
implementation("io.ktor:ktor-server-cors:$ktorVersion")
implementation("io.ktor:ktor-server-http-redirect:$ktorVersion")
implementation("io.ktor:ktor-server-call-logging:$ktorVersion")
implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-client-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-network-jvm:$ktorVersion")
implementation("io.ktor:ktor-client-java:$ktorVersion")
implementation("dev.kord:kord-core:$kordVersion")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "17"
}
val jvmJar = tasks.named<Jar>("jar") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
manifest {
attributes(
mapOf(
"Main-Class" to "wotw.server.main.WotwBackendServer"
)
)
}
from(configurations["runtimeClasspath"].map { if (it.isDirectory) it else zipTree(it) })
}
tasks.create<JavaExec>("run") {
group = "application"
main = "wotw.server.main.WotwBackendServer"
jvmArgs = listOf("-Xint")
// jvmArgs = listOf("-XX:CompileCommand=exclude,wotw/server/game/GameSyncHandler.onPlayerPositionMessage")
classpath(configurations["runtimeClasspath"], jvmJar)
}
val compileKotlin: KotlinCompile by tasks