From 5ed9c41243e09420403209c90e7494e439c2c891 Mon Sep 17 00:00:00 2001 From: Arkadii Ivanov Date: Mon, 7 Jun 2021 15:52:52 +0100 Subject: [PATCH] TodoApp. Update Kotlin to 1.5.10, Compose to 0.4.0, and other deps. (#756) --- .../todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt | 8 ++++---- .../kotlin/example/todo/common/ui/TodoEditUi.kt | 4 ++-- .../kotlin/example/todo/common/ui/TodoMainUi.kt | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt b/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt index b5a1dc95da..4d14984b7c 100644 --- a/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt +++ b/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt @@ -3,7 +3,7 @@ object Deps { object JetBrains { object Kotlin { // __KOTLIN_COMPOSE_VERSION__ - private const val VERSION = "1.4.32" + private const val VERSION = "1.5.10" const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$VERSION" const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:$VERSION" const val testJunit = "org.jetbrains.kotlin:kotlin-test-junit:$VERSION" @@ -12,7 +12,7 @@ object Deps { object Compose { // __LATEST_COMPOSE_RELEASE_VERSION__ - private const val VERSION = "0.4.0-build183" + private const val VERSION = "0.4.0" const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION" } } @@ -47,7 +47,7 @@ object Deps { } object Decompose { - private const val VERSION = "0.2.3" + private const val VERSION = "0.2.6" const val decompose = "com.arkivanov.decompose:decompose:$VERSION" const val extensionsCompose = "com.arkivanov.decompose:extensions-compose-jetbrains:$VERSION" } @@ -65,7 +65,7 @@ object Deps { object Squareup { object SQLDelight { - private const val VERSION = "1.4.4" + private const val VERSION = "1.5.0" const val gradlePlugin = "com.squareup.sqldelight:gradle-plugin:$VERSION" const val androidDriver = "com.squareup.sqldelight:android-driver:$VERSION" diff --git a/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoEditUi.kt b/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoEditUi.kt index f1b1a39d77..93e1bb1e03 100644 --- a/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoEditUi.kt +++ b/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoEditUi.kt @@ -19,12 +19,12 @@ import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import com.arkivanov.decompose.extensions.compose.jetbrains.asState +import com.arkivanov.decompose.extensions.compose.jetbrains.subscribeAsState import example.todo.common.edit.TodoEdit @Composable fun TodoEditContent(component: TodoEdit) { - val model by component.models.asState() + val model by component.models.subscribeAsState() Column(horizontalAlignment = Alignment.CenterHorizontally) { TopAppBar( diff --git a/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoMainUi.kt b/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoMainUi.kt index fc76d65684..e1548dcda7 100644 --- a/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoMainUi.kt +++ b/examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoMainUi.kt @@ -30,13 +30,13 @@ import androidx.compose.ui.input.key.onKeyEvent import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp -import com.arkivanov.decompose.extensions.compose.jetbrains.asState +import com.arkivanov.decompose.extensions.compose.jetbrains.subscribeAsState import example.todo.common.main.TodoItem import example.todo.common.main.TodoMain @Composable fun TodoMainContent(component: TodoMain) { - val model by component.models.asState() + val model by component.models.subscribeAsState() Column { TopAppBar(title = { Text(text = "Todo List") })