Skip to content

Commit a34d4d9

Browse files
committed
Updated the :test-modules:client-tests Kotlinx Coroutines dependency version to align with the io_mockk_kotlin_version Gradle project property, if set.
1 parent c0090c4 commit a34d4d9

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

test-modules/client-tests/build.gradle.kts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,30 @@ val kotlinVersion: String =
88
.gradleProperty("io_mockk_kotlin_version")
99
.getOrElse(libs.versions.kotlin.get())
1010

11+
val coroutinesVersion: String =
12+
if (providers.gradleProperty("io_mockk_kotlin_version").isPresent) {
13+
when {
14+
kotlinVersion.startsWith("1.5") -> "1.5.2"
15+
kotlinVersion.startsWith("1.6") -> "1.6.4"
16+
kotlinVersion.startsWith("1.7") -> "1.6.4"
17+
kotlinVersion.startsWith("1.8") -> "1.7.3"
18+
kotlinVersion.startsWith("1.9") -> "1.8.1"
19+
else -> libs.versions.coroutines.get()
20+
}
21+
} else {
22+
libs.versions.coroutines.get()
23+
}
24+
1125
kotlin {
1226
jvm {}
1327

1428
sourceSets {
1529
val commonMain by getting {
1630
dependencies {
17-
implementation(project.dependencies.enforcedPlatform(kotlin("bom", version = kotlinVersion)))
31+
implementation(dependencies.enforcedPlatform(kotlin("bom", version = kotlinVersion)))
1832
implementation(kotlin("reflect"))
1933

20-
implementation(dependencies.platform(libs.kotlin.coroutines.bom))
34+
implementation(dependencies.enforcedPlatform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:$coroutinesVersion"))
2135
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
2236
}
2337
}

0 commit comments

Comments
 (0)