From ffea196aa8eeb2ec6be6d59bcf96b57916159ce2 Mon Sep 17 00:00:00 2001 From: Oleksandr Karpovich Date: Tue, 6 Feb 2024 18:18:48 +0100 Subject: [PATCH] Use coroutines 1.7.3 for desktop and native. But use 1.8.0-RC2 for web targets (#4244) --- components/gradle/libs.versions.toml | 2 +- components/resources/library/build.gradle.kts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/components/gradle/libs.versions.toml b/components/gradle/libs.versions.toml index 39edcda408..0a6d16ca83 100644 --- a/components/gradle/libs.versions.toml +++ b/components/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlinx-coroutines = "1.8.0-RC2" +kotlinx-coroutines = "1.7.3" androidx-appcompat = "1.6.1" androidx-activity-compose = "1.8.2" androidx-test = "1.5.0" diff --git a/components/resources/library/build.gradle.kts b/components/resources/library/build.gradle.kts index 1e563934c5..222274e5f8 100644 --- a/components/resources/library/build.gradle.kts +++ b/components/resources/library/build.gradle.kts @@ -204,3 +204,16 @@ afterEvaluate { if (name == "compileWebMainKotlinMetadata") enabled = false } } + +// TODO: remove this (https://youtrack.jetbrains.com/issue/COMPOSE-939) +configurations.all { + val isWeb = name.startsWith("wasmJs") || name.startsWith("js") + if (isWeb) { + resolutionStrategy.eachDependency { + if (requested.group.startsWith("org.jetbrains.kotlinx") && + requested.name.startsWith("kotlinx-coroutines-")) { + useVersion("1.8.0-RC2") + } + } + } +} \ No newline at end of file