Skip to content

Commit

Permalink
Introduce coroutines platform to have all the dependencies aligned
Browse files Browse the repository at this point in the history
Fixes #2865
  • Loading branch information
qwwdfsad committed Sep 24, 2021
1 parent 73ba62a commit 8960826
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions build.gradle
Expand Up @@ -2,11 +2,10 @@
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/


import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.konan.target.HostManager
import org.gradle.util.VersionNumber
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask

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

configure(subprojects.findAll { !unpublished.contains(it.name) }) {
if (it.name == "kotlinx-coroutines-bom" || it.name == "kotlinx.coroutines") return
if (it.name == coreModule) {
kotlin.sourceSets.jvmMain.dependencies {
delegate.project.dependencies {
api platform(project(":kotlinx-coroutines-bom"))
}
}
} else {
dependencies {
api platform(project(":kotlinx-coroutines-bom"))
}
}

}
// Configure subprojects with Kotlin sources
configure(subprojects.findAll { !sourceless.contains(it.name) }) {
// Use atomicfu plugin, it also adds all the necessary dependencies
Expand Down

0 comments on commit 8960826

Please sign in to comment.