Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Plugin: Force kotlinx-coroutines version 1.8.0-RC2 for web targets in user projects #4278

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions components/resources/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,3 @@ 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")
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@ abstract class ComposePlugin : Plugin<Project> {

disableSignatureClashCheck(project)
}

// TODO: remove this (https://youtrack.jetbrains.com/issue/COMPOSE-939)
// we substitute the coroutines version for web targets in user projects,
// so they don't need to do that manually
project.configurations.all {
val isWeb = it.name.startsWith("wasmJs") || it.name.startsWith("js")
if (isWeb) {
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) {
it.useVersion("1.8.0-RC2")
}
}
}
}
}
}

private fun disableSignatureClashCheck(project: Project) {
Expand Down
Loading