Skip to content

Commit cc873bf

Browse files
bastian-srcBastian Schmidt
authored andcommitted
Add API server using KTor
* Change ViewModels to Singletons * Add KTor server in APIHandler * Add API routes for celldata * /cells and /cell/id API that return json-serialized CellData * Adapt UI symbols for server status * Adapt APIStatus layout
1 parent db94b89 commit cc873bf

25 files changed

+460
-755
lines changed

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle.kts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
alias(libs.plugins.androidApplication)
33
alias(libs.plugins.jetbrainsKotlinAndroid)
4+
alias(libs.plugins.jetbrainsKotlinPlugin)
45
}
56

67
android {
@@ -48,6 +49,12 @@ android {
4849
}
4950
}
5051
}
52+
packaging {
53+
resources {
54+
excludes += "META-INF/INDEX.LIST"
55+
excludes += "META-INF/io.netty.versions.properties"
56+
}
57+
}
5158
}
5259

5360
dependencies {
@@ -65,7 +72,15 @@ dependencies {
6572
implementation(libs.androidx.lifecycle.livedata.ktx)
6673
implementation(libs.androidx.lifecycle.viewmodel.ktx)
6774
implementation(libs.androidx.fragment.ktx)
75+
implementation(libs.androidx.lifecycle.service)
6876
testImplementation(libs.junit)
6977
androidTestImplementation(libs.androidx.junit)
7078
androidTestImplementation(libs.androidx.espresso.core)
71-
}
79+
80+
// Ktor
81+
implementation(libs.ktor.server.netty)
82+
implementation(libs.ktor.server.core)
83+
implementation(libs.ktor.server.request.validation)
84+
implementation(libs.ktor.server.content.negotiation)
85+
implementation(libs.ktor.serialization.kotlinx.json)
86+
}

app/src/Session.vim

Lines changed: 0 additions & 312 deletions
This file was deleted.

0 commit comments

Comments
 (0)