From 308a1f170dde2ed9ac16281afd4e652a7ee02969 Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Tue, 11 Oct 2022 19:31:19 +0200 Subject: [PATCH] Fix Todo example (#2391) * Fix Todo example In 1.1.1 we remove Dispatcher.Main from dependencies, because Compose can be embedded into different platform with their own Dispatcher.Main (IDEA, for example). Because of that, end applications should include it explicitly if they want to use it. * Refactor --- examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt | 5 +++++ examples/todoapp/desktop/build.gradle.kts | 1 + 2 files changed, 6 insertions(+) diff --git a/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt b/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt index bc5b542f1d..57e28c9d2e 100644 --- a/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt +++ b/examples/todoapp/buildSrc/buildSrc/src/main/kotlin/Deps.kt @@ -20,6 +20,11 @@ object Deps { val testAnnotationsCommon get() = "org.jetbrains.kotlin:kotlin-test-annotations-common:$VERSION" } + object Coroutines { + private val VERSION get() = "1.6.4" + val swing get() = "org.jetbrains.kotlinx:kotlinx-coroutines-swing:$VERSION" + } + object Compose { private val VERSION get() = properties["compose.version"] val gradlePlugin get() = "org.jetbrains.compose:compose-gradle-plugin:$VERSION" diff --git a/examples/todoapp/desktop/build.gradle.kts b/examples/todoapp/desktop/build.gradle.kts index 4f7dc9d7dc..db755cbebd 100755 --- a/examples/todoapp/desktop/build.gradle.kts +++ b/examples/todoapp/desktop/build.gradle.kts @@ -18,6 +18,7 @@ kotlin { implementation(project(":common:database")) implementation(project(":common:root")) implementation(project(":common:compose-ui")) + implementation(Deps.JetBrains.Coroutines.swing) implementation(Deps.ArkIvanov.Decompose.decompose) implementation(Deps.ArkIvanov.Decompose.extensionsCompose) implementation(Deps.ArkIvanov.MVIKotlin.mvikotlin)