Skip to content

Commit 8960826

Browse files
committed
Introduce coroutines platform to have all the dependencies aligned
Fixes #2865
1 parent 73ba62a commit 8960826

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

build.gradle

+17-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5+
6+
import org.jetbrains.dokka.gradle.DokkaTaskPartial
57
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
68
import org.jetbrains.kotlin.konan.target.HostManager
7-
import org.gradle.util.VersionNumber
8-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
9-
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
109

1110
apply plugin: 'jdk-convention'
1211
apply from: rootProject.file("gradle/opt-in.gradle")
@@ -155,6 +154,21 @@ configure(subprojects.findAll { !sourceless.contains(it.name) && it.name != core
155154
}
156155
}
157156

157+
configure(subprojects.findAll { !unpublished.contains(it.name) }) {
158+
if (it.name == "kotlinx-coroutines-bom" || it.name == "kotlinx.coroutines") return
159+
if (it.name == coreModule) {
160+
kotlin.sourceSets.jvmMain.dependencies {
161+
delegate.project.dependencies {
162+
api platform(project(":kotlinx-coroutines-bom"))
163+
}
164+
}
165+
} else {
166+
dependencies {
167+
api platform(project(":kotlinx-coroutines-bom"))
168+
}
169+
}
170+
171+
}
158172
// Configure subprojects with Kotlin sources
159173
configure(subprojects.findAll { !sourceless.contains(it.name) }) {
160174
// Use atomicfu plugin, it also adds all the necessary dependencies

0 commit comments

Comments
 (0)