Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Dec 26, 2023
1 parent a5f5bd9 commit 55b6ac7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/android/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
-keepclassmembers class org.litote.kmongo.id.StringId {
public <init>(java.lang.String);
}
# This isn't used so it can be eliminated
-dontwarn dev.schlaubi.tonbrett.common.IdSerializer

# logback
-keep class ch.qos.logback.classic.spi.LogbackServiceProvider
Expand Down
2 changes: 2 additions & 0 deletions app/desktop/rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
-keepclassmembers class org.litote.kmongo.id.StringId {
public <init>(java.lang.String);
}
# This isn't used so it can be eliminated
-dontwarn dev.schlaubi.tonbrett.common.IdSerializer

# logback
-keep class ch.qos.logback.classic.spi.LogbackServiceProvider
Expand Down
8 changes: 7 additions & 1 deletion app/web/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ plugins {
id("org.jetbrains.compose")
}

repositories {
maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap/")
}

kotlin {
js(IR) {
browser()
Expand Down Expand Up @@ -33,7 +37,9 @@ kotlin {
@OptIn(ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
implementation(compose.materialIconsExtended)
implementation(libs.ktor.sse)

// For some reason this is needed, otherwise the js compiler complains
implementation("io.ktor:ktor-sse:2.3.3-eap-756")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fun Route.files() {
val path = Config.SOUNDS_FOLDER / sound.fileName

val contentType = contentTypeRaw?.let { ContentType.parse(contentTypeRaw) }
?: ContentType.defaultForPath(path)
?: ContentType.defaultForFile(path)

val content = LocalFileContent(
path.toFile(),
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

allprojects {
group = "dev.schlaubi.tonbrett"
version = "1.18.3"
version = "1.18.4"

repositories {
mavenCentral()
Expand Down
8 changes: 4 additions & 4 deletions client/src/commonMain/kotlin/WebSocketRetry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private val LOG = KotlinLogging.logger { }
*
* @see retryingWebSocket
*/
val WebSocketRetry = createClientPlugin("WebSocketRetry", { HttpRequestRetryConfig() }) {}
val WebSocketRetry = createClientPlugin("WebSocketRetry", { HttpRequestRetry.Configuration() }) {}

/**
* Exception used for logging WebSocket connection errors.
Expand All @@ -45,12 +45,12 @@ suspend fun HttpClient.retryingWebSocket(

private class WebSocketRetryContext(
val client: HttpClient,
val config: HttpRequestRetryConfig,
val config: HttpRequestRetry.Configuration,
val httpRequestBuilder: HttpRequestBuilder.() -> Unit,
val handler: suspend DefaultClientWebSocketSession.() -> Unit
) {
lateinit var session: DefaultClientWebSocketSession
private var delayContext: HttpRetryDelayContext? = null
private var delayContext: HttpRequestRetry.DelayContext? = null
private var tries = 1

fun reset() {
Expand All @@ -63,7 +63,7 @@ private class WebSocketRetryContext(

suspend fun reconnect(e: Throwable, isRetry: Boolean = true) {
if (!isRetry) {
delayContext = HttpRetryDelayContext(
delayContext = HttpRequestRetry.DelayContext(
HttpRequestBuilder(),
session.call.response,
e
Expand Down
12 changes: 7 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[versions]
kotlin = "2.0.0-Beta1"
ktor = "3.0.0-beta-1"
# lastest ktor version is broken on native
#noinspection GradleDependency
ktor = "2.3.6"
kmongo = "4.10.0"
kord = "0.12.0"
mikbot = "3.27.0"
Expand All @@ -19,7 +21,7 @@ compose-compiler = "1.5.5-dev-k2.0.0-Beta1-06b8ae672a4"
coil = "3.0.0-20231208.205440-1"

[libraries]
kotlinx-serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.6.1" }
kotlinx-serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.6.2" }
kmongo-id-serialization = { group = "org.litote.kmongo", name = "kmongo-id-serialization", version.ref = "kmongo" }
kmongo-serialization = { group = "org.litote.kmongo", name = "kmongo-serialization", version.ref = "kmongo" }
kord-common = { group = "dev.kord", name = "kord-common", version.ref = "kord" }
Expand Down Expand Up @@ -63,11 +65,11 @@ logback = { group = "ch.qos.logback", name = "logback-classic", version = "1.4.1

kvault = { group = "com.liftric", name = "kvault", version = "1.10.0" }

androidx-activity = { group = "androidx.activity", name = "activity-compose", version = "1.8.1" }
androidx-activity = { group = "androidx.activity", name = "activity-compose", version = "1.8.2" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version = "1.6.1" }
androidx-core = { group = "androidx.core", name = "core-ktx", version = "1.12.0" }
androidx-browser = { group = "androidx.browser", name = "browser", version = "1.7.0" }
mdc-android = { group = "com.google.android.material", name = "material", version = "1.10.0" }
mdc-android = { group = "com.google.android.material", name = "material", version = "1.11.0" }
google-play = { group = "com.google.android.play", name = "app-update", version.ref = "google-play" }
google-play-ktx = { group = "com.google.android.play", name = "app-update-ktx", version.ref = "google-play" }

Expand Down Expand Up @@ -104,5 +106,5 @@ android-base = { id = "com.android.base", version.ref = "android" }
android-application = { id = "com.android.application", version.ref = "android" }
android-library = { id = "com.android.library", version.ref = "android" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
buildconfig = { id = "com.github.gmazzo.buildconfig", version = "4.1.2" }
buildconfig = { id = "com.github.gmazzo.buildconfig", version = "5.1.0" }
protobuf = { id = "com.google.protobuf", version = "0.9.4" }

0 comments on commit 55b6ac7

Please sign in to comment.