Browse Source

TodoApp. Update Kotlin to 1.5.10, Compose to 0.4.0, and other deps. (#756)

pull/764/head
Arkadii Ivanov 3 years ago committed by GitHub
parent
commit
5ed9c41243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt
  2. 4
      examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoEditUi.kt
  3. 4
      examples/todoapp/common/compose-ui/src/commonMain/kotlin/example/todo/common/ui/TodoMainUi.kt

8
examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt

@ -3,7 +3,7 @@ object Deps {
object JetBrains { object JetBrains {
object Kotlin { object Kotlin {
// __KOTLIN_COMPOSE_VERSION__ // __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 gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$VERSION"
const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:$VERSION" const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:$VERSION"
const val testJunit = "org.jetbrains.kotlin:kotlin-test-junit:$VERSION" const val testJunit = "org.jetbrains.kotlin:kotlin-test-junit:$VERSION"
@ -12,7 +12,7 @@ object Deps {
object Compose { object Compose {
// __LATEST_COMPOSE_RELEASE_VERSION__ // __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" const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION"
} }
} }
@ -47,7 +47,7 @@ object Deps {
} }
object Decompose { 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 decompose = "com.arkivanov.decompose:decompose:$VERSION"
const val extensionsCompose = "com.arkivanov.decompose:extensions-compose-jetbrains:$VERSION" const val extensionsCompose = "com.arkivanov.decompose:extensions-compose-jetbrains:$VERSION"
} }
@ -65,7 +65,7 @@ object Deps {
object Squareup { object Squareup {
object SQLDelight { 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 gradlePlugin = "com.squareup.sqldelight:gradle-plugin:$VERSION"
const val androidDriver = "com.squareup.sqldelight:android-driver:$VERSION" const val androidDriver = "com.squareup.sqldelight:android-driver:$VERSION"

4
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.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp 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 import example.todo.common.edit.TodoEdit
@Composable @Composable
fun TodoEditContent(component: TodoEdit) { fun TodoEditContent(component: TodoEdit) {
val model by component.models.asState() val model by component.models.subscribeAsState()
Column(horizontalAlignment = Alignment.CenterHorizontally) { Column(horizontalAlignment = Alignment.CenterHorizontally) {
TopAppBar( TopAppBar(

4
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.AnnotatedString
import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp 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.TodoItem
import example.todo.common.main.TodoMain import example.todo.common.main.TodoMain
@Composable @Composable
fun TodoMainContent(component: TodoMain) { fun TodoMainContent(component: TodoMain) {
val model by component.models.asState() val model by component.models.subscribeAsState()
Column { Column {
TopAppBar(title = { Text(text = "Todo List") }) TopAppBar(title = { Text(text = "Todo List") })

Loading…
Cancel
Save