Skip to content

Commit 2b39dd8

Browse files
committed
build: Update dependencies
1 parent b6bb0b8 commit 2b39dd8

File tree

13 files changed

+40
-29
lines changed

13 files changed

+40
-29
lines changed

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ kotlin {
6464
implementation("io.ktor:ktor-client-cio:$ktorVersion")
6565
implementation("io.ktor:ktor-client-core:$ktorVersion")
6666
implementation("io.ktor:ktor-client-serialization:$ktorVersion")
67-
implementation("org.jetbrains.kotlinx:atomicfu:0.16.2")
68-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
69-
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.0")
70-
implementation("org.slf4j:slf4j-simple:1.7.30")
67+
implementation("org.jetbrains.kotlinx:atomicfu:0.17.0")
68+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-RC2")
69+
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.1")
70+
implementation("org.slf4j:slf4j-simple:1.7.32")
7171
api("co.touchlab:kermit:$kermitVersion")
7272
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0")
7373
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ org.gradle.jvmargs=-Xms512m -Xmx4g
22

33
# Dependency Versions
44

5-
ktorVersion=1.6.4
6-
kermitVersion=0.1.9
5+
ktorVersion=1.6.7
6+
kermitVersion=1.0.0
77

88
kotlin.code.style=official
99

src/commonMain/kotlin/com/codellyrandom/hassle/Connection.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.core.Credentials
56
import com.codellyrandom.hassle.core.clients.WebSocketClient
67
import com.codellyrandom.hassle.core.mapping.ObjectMapper
@@ -17,7 +18,7 @@ internal class Connection(
1718
private val objectMapper: ObjectMapper,
1819
private val httpClient: WebSocketClient = WebSocketClient(HttpClient(CIO).config { install(WebSockets) })
1920
) {
20-
private val logger = Kermit()
21+
private val logger = Logger(config = LoggerConfig.default)
2122

2223
private val method = HttpMethod.Get
2324
private val path = "/api/websocket"

src/commonMain/kotlin/com/codellyrandom/hassle/HomeAssistantApiClientImpl.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.communicating.Command
56
import com.codellyrandom.hassle.communicating.ServiceCommandResolver
67
import com.codellyrandom.hassle.core.Credentials
@@ -49,7 +50,7 @@ internal class HomeAssistantApiClientImpl(
4950
coroutineScope: CoroutineScope,
5051
) : HomeAssistantApiClient {
5152

52-
private val logger = Kermit()
53+
private val logger = Logger(config = LoggerConfig.default)
5354
val mapper: ObjectMapper = ObjectMapper()
5455
private val connection: Connection = Connection(
5556
credentials,

src/commonMain/kotlin/com/codellyrandom/hassle/core/boot/EventResponseConsumer.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.core.boot
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.EventHandlerByEventType
56
import com.codellyrandom.hassle.WebSocketSession
67
import com.codellyrandom.hassle.core.*
@@ -27,7 +28,7 @@ internal class EventResponseConsumer(
2728
private val eventHandlerByEventType: EventHandlerByEventType,
2829
private val errorResponseHandler: (ErrorResponseData) -> Unit
2930
) {
30-
private val logger = Kermit()
31+
private val logger = Logger(config = LoggerConfig.default)
3132

3233
suspend fun consumeBlocking() = coroutineScope {
3334
session.consumeEachMappedToResponse { response, frameText ->

src/commonMain/kotlin/com/codellyrandom/hassle/core/boot/StateChangeEventSubscriber.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.core.boot
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.HomeAssistantApiClientImpl
56
import com.codellyrandom.hassle.WebSocketSession
67
import com.codellyrandom.hassle.communicating.SubscribeEventsCommand
@@ -12,7 +13,7 @@ internal class StateChangeEventSubscriber(
1213
private val session: WebSocketSession
1314
) {
1415

15-
private val logger = Kermit()
16+
private val logger = Logger(config = LoggerConfig.default)
1617

1718
suspend fun subscribe() {
1819
sendEventListenerRequest()

src/commonMain/kotlin/com/codellyrandom/hassle/core/boot/authentication/Authenticator.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.core.boot.authentication
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.WebSocketSession
56
import com.codellyrandom.hassle.core.Credentials
67

@@ -28,7 +29,7 @@ internal class Authenticator(
2829
}
2930
}
3031

31-
private val logger = Kermit()
32+
private val logger = Logger(config = LoggerConfig.default)
3233
private val authRequest =
3334
AuthRequest(accessToken = credentials.accessToken)
3435

src/commonMain/kotlin/com/codellyrandom/hassle/core/boot/servicestore/ServiceStoreInitializer.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.core.boot.servicestore
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.HomeAssistantApiClientImpl
56
import com.codellyrandom.hassle.WebSocketSession
67
import com.codellyrandom.hassle.communicating.GetServicesCommand
@@ -10,7 +11,7 @@ internal class ServiceStoreInitializer(
1011
private val session: WebSocketSession,
1112
private val serviceStore: ServiceStore
1213
) {
13-
private val logger = Kermit()
14+
private val logger = Logger(config = LoggerConfig.default)
1415
private val getServicesCommand = GetServicesCommand()
1516

1617
suspend fun initialize() {

src/commonMain/kotlin/com/codellyrandom/hassle/core/boot/statehandling/EntityStateInitializer.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.core.boot.statehandling
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.HomeAssistantApiClientImpl
56
import com.codellyrandom.hassle.WebSocketSession
67
import com.codellyrandom.hassle.communicating.GetStatesCommand
@@ -19,7 +20,7 @@ internal class EntityStateInitializer(
1920
private val entityRegistrationValidation: EntityRegistrationValidation
2021
) {
2122

22-
private val logger = Kermit()
23+
private val logger = Logger(config = LoggerConfig.default)
2324

2425
private val statesRequest = GetStatesCommand()
2526

src/commonMain/kotlin/com/codellyrandom/hassle/core/boot/subscribing/HassEventSubscriber.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.core.boot.subscribing
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.EventHandlerByEventType
56
import com.codellyrandom.hassle.HomeAssistantApiClientImpl
67
import com.codellyrandom.hassle.WebSocketSession
@@ -12,7 +13,7 @@ internal class HassEventSubscriber(
1213
private val subscriptions: EventHandlerByEventType,
1314
private val apiClient: HomeAssistantApiClientImpl
1415
) {
15-
private val logger = Kermit()
16+
private val logger = Logger(config = LoggerConfig.default)
1617

1718
suspend fun subscribe() {
1819
subscriptions.forEach { entry ->

src/commonMain/kotlin/com/codellyrandom/hassle/core/mapping/ObjectMapper.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.core.mapping
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import kotlinx.serialization.*
56
import kotlinx.serialization.json.Json
67
import kotlinx.serialization.json.JsonElement
@@ -12,7 +13,7 @@ import kotlin.reflect.typeOf
1213

1314
class ObjectMapper(
1415
private val delegate: Json = makeJson(),
15-
private val logger: Kermit = Kermit()
16+
private val logger: Logger = Logger(config = LoggerConfig.default)
1617
) {
1718
@OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
1819
fun <Target : Any> fromJson(json: JsonElement, type: KClass<Target>): Target {

src/commonMain/kotlin/com/codellyrandom/hassle/entities/DeviceStateUpdater.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package com.codellyrandom.hassle.entities
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.ActuatorsByApiName
56
import com.codellyrandom.hassle.SensorsByApiName
67
import com.codellyrandom.hassle.values.EntityId
78
import kotlinx.serialization.json.JsonObject
89

910
internal class ActuatorStateUpdater(private val actuatorsByApiName: ActuatorsByApiName) {
10-
private val logger = Kermit()
11+
private val logger = Logger(config = LoggerConfig.default)
1112

1213
operator fun invoke(newActualState: JsonObject, entityId: EntityId) {
1314
actuatorsByApiName[entityId]?.let { entity ->
@@ -19,7 +20,7 @@ internal class ActuatorStateUpdater(private val actuatorsByApiName: ActuatorsByA
1920
}
2021

2122
internal class SensorStateUpdater(private val sensorsByApiName: SensorsByApiName) {
22-
private val logger = Kermit()
23+
private val logger = Logger(config = LoggerConfig.default)
2324

2425
operator fun invoke(newActualState: JsonObject, entityId: EntityId) {
2526
sensorsByApiName[entityId]?.let { entity ->

src/commonMain/kotlin/com/codellyrandom/hassle/entities/EntityRegistrationValidation.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.codellyrandom.hassle.entities
22

3-
import co.touchlab.kermit.Kermit
3+
import co.touchlab.kermit.Logger
4+
import co.touchlab.kermit.LoggerConfig
45
import com.codellyrandom.hassle.ActuatorsByApiName
56
import com.codellyrandom.hassle.SensorsByApiName
67
import com.codellyrandom.hassle.values.EntityId
@@ -9,7 +10,7 @@ internal class EntityRegistrationValidation(
910
private val actuatorsByApiName: ActuatorsByApiName,
1011
private val sensorsByApiName: SensorsByApiName
1112
) {
12-
private val logger = Kermit()
13+
private val logger = Logger(config = LoggerConfig.default)
1314

1415
private val failedIds = mutableListOf<EntityId>()
1516

0 commit comments

Comments
 (0)