aboutsummaryrefslogtreecommitdiff
path: root/server/core/build.gradle.kts
blob: 87f613a7fb95b4eb5488ab7ca9d81ff59d429292 (plain)
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
plugins {
	kotlin("jvm")
	kotlin("plugin.serialization")
	application
}

val ktor_version = "3.0.3"

dependencies {
	implementation(platform("io.ktor:ktor-bom:$ktor_version"))
	implementation("io.ktor:ktor-server-netty")
	implementation("io.ktor:ktor-server-status-pages")
	implementation("io.ktor:ktor-server-content-negotiation")
	implementation("io.ktor:ktor-server-openapi")
	implementation("io.ktor:ktor-serialization-kotlinx-json")
	implementation("io.ktor:ktor-server-compression")
	implementation(project(":database:impl"))

	runtimeOnly("ch.qos.logback:logback-classic:1.5.16")
	runtimeOnly("org.xerial:sqlite-jdbc:3.45.3.0")
}

java {
	toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
application {
	val isDevelopment: Boolean = project.ext.has("development")
	applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment",
									   "-Dledger.databasefolder=${project(":mod").file("run/money-ledger").absoluteFile}")
	mainClass.set("moe.nea.ledger.server.core.ApplicationKt")
}