Browse Source

Gradle Plugin: Simplify coroutines version check (#4283)

pull/4286/head
Oleksandr Karpovich 9 months ago committed by GitHub
parent
commit
689f63112a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt

8
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt

@ -19,8 +19,8 @@ import org.jetbrains.compose.desktop.DesktopExtension
import org.jetbrains.compose.desktop.application.internal.configureDesktop
import org.jetbrains.compose.desktop.preview.internal.initializePreview
import org.jetbrains.compose.experimental.dsl.ExperimentalExtension
import org.jetbrains.compose.experimental.internal.configureExperimentalTargetsFlagsCheck
import org.jetbrains.compose.experimental.internal.configureExperimental
import org.jetbrains.compose.experimental.internal.configureExperimentalTargetsFlagsCheck
import org.jetbrains.compose.experimental.internal.configureNativeCompilerCaching
import org.jetbrains.compose.internal.KOTLIN_MPP_PLUGIN_ID
import org.jetbrains.compose.internal.mppExt
@ -31,11 +31,11 @@ import org.jetbrains.compose.internal.utils.currentTarget
import org.jetbrains.compose.resources.configureComposeResources
import org.jetbrains.compose.resources.ios.configureSyncTask
import org.jetbrains.compose.web.WebExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
internal val composeVersion get() = ComposeBuildConfig.composeVersion
@ -97,7 +97,7 @@ abstract class ComposePlugin : Plugin<Project> {
it.resolutionStrategy.eachDependency {
if (it.requested.group.startsWith("org.jetbrains.kotlinx") &&
it.requested.name.startsWith("kotlinx-coroutines-")) {
if (it.requested.version?.startsWith("1.8") != true) {
if (it.requested.version?.startsWith("1.7") == true) {
it.useVersion("1.8.0-RC2")
}
}

Loading…
Cancel
Save