forked from dkittle/party-connections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
85 lines (76 loc) · 3.21 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlin_version: String by project
val logback_version: String by project
val prometheus_version: String by project
val kotlinx_html_version: String by project
val mongo_version: String by project
val application_version: String by project
plugins {
kotlin("jvm") version "2.0.0"
id("io.ktor.plugin") version "2.3.11"
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.0"
}
group = "ca.kittle"
version = "0.0.1-alpha"
project.ext.set("development", "true")
application {
mainClass.set("ca.kittle.ApplicationKt")
val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}
repositories {
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers") }
}
ktor {
docker {
jreVersion.set(JavaVersion.VERSION_17)
localImageName.set("party-connections-image")
imageTag.set(application_version)
portMappings.set(
listOf(
io.ktor.plugin.features.DockerPortMapping(
80,
8080,
io.ktor.plugin.features.DockerPortMappingProtocol.TCP,
),
),
)
}
}
dependencies {
implementation("io.ktor:ktor-server-core-jvm")
implementation("io.ktor:ktor-server-host-common-jvm")
implementation("io.ktor:ktor-server-status-pages-jvm")
implementation("io.ktor:ktor-server-caching-headers-jvm")
implementation("io.ktor:ktor-server-compression-jvm")
implementation("io.ktor:ktor-server-forwarded-header-jvm")
implementation("io.ktor:ktor-server-call-logging-jvm")
implementation("io.ktor:ktor-server-call-id-jvm")
implementation("io.ktor:ktor-server-metrics-jvm")
implementation("io.ktor:ktor-server-metrics-micrometer-jvm")
implementation("io.ktor:ktor-server-content-negotiation-jvm")
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm")
implementation("io.ktor:ktor-server-html-builder-jvm")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version")
implementation("org.jetbrains:kotlin-css-jvm:1.0.0-pre.129-kotlin-1.4.20")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
implementation("org.mongodb:mongodb-driver-core:$mongo_version")
implementation("org.mongodb:mongodb-driver-sync:$mongo_version")
implementation("org.mongodb:bson:$mongo_version")
implementation("io.ktor:ktor-server-websockets-jvm")
implementation("io.ktor:ktor-client-core-jvm")
implementation("io.ktor:ktor-client-logging")
implementation("io.ktor:ktor-client-apache-jvm")
implementation("io.ktor:ktor-client-content-negotiation")
implementation("io.ktor:ktor-server-netty-jvm")
implementation("io.github.microutils:kotlin-logging-jvm:3.0.4")
implementation("ch.qos.logback:logback-classic:$logback_version")
testImplementation("io.ktor:ktor-server-tests-jvm")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-Xcontext-receivers"
}
}