aboutsummaryrefslogtreecommitdiff
path: root/server/core/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-01-16 23:25:34 +0100
committerLinnea Gräf <nea@nea.moe>2025-01-16 23:25:34 +0100
commit38409988c0ed3e171e77ee691154775b36ed1e00 (patch)
tree64c15e6af17c27fc1b995b2790e7afc654eefb45 /server/core/build.gradle.kts
parent5daefca0b50e563152462f0ee1a963b8c98c33f0 (diff)
downloadLocalTransactionLedger-38409988c0ed3e171e77ee691154775b36ed1e00.tar.gz
LocalTransactionLedger-38409988c0ed3e171e77ee691154775b36ed1e00.tar.bz2
LocalTransactionLedger-38409988c0ed3e171e77ee691154775b36ed1e00.zip
feat: Add basic server implementation
Diffstat (limited to 'server/core/build.gradle.kts')
-rw-r--r--server/core/build.gradle.kts31
1 files changed, 31 insertions, 0 deletions
diff --git a/server/core/build.gradle.kts b/server/core/build.gradle.kts
new file mode 100644
index 0000000..87f613a
--- /dev/null
+++ b/server/core/build.gradle.kts
@@ -0,0 +1,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")
+}