From d361f65a67418cf65cff0ce126477e7322e16444 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Fri, 24 Sep 2021 16:16:04 +0300 Subject: [PATCH] Introduce coroutines platform to have all the dependencies aligned Fixes #2865 --- build.gradle | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build.gradle b/build.gradle index 26b598ff5d..35b71261c0 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,8 @@ * 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.jetbrains.dokka.gradle.DokkaTaskPartial @@ -160,6 +162,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