1 /*
2 * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3 */
4 @file:JvmName("Projects")
5 import org.gradle.api.*
6
Projectnull7 fun Project.version(target: String): String =
8 property("${target}_version") as String
9
10 val coreModule = "kotlinx-coroutines-core"
11 val jdk8ObsoleteModule = "kotlinx-coroutines-jdk8"
12 val testModule = "kotlinx-coroutines-test"
13
14 val multiplatform = setOf(coreModule, testModule)
15 // Not applicable for Kotlin plugin
16 val sourceless = setOf("kotlinx.coroutines", "kotlinx-coroutines-bom")
17 val internal = setOf("kotlinx.coroutines", "benchmarks")
18 // Not published
19 val unpublished = internal + setOf("example-frontend-js", "android-unit-tests")
20
21 val Project.isMultiplatform: Boolean get() = name in multiplatform
22
23 // Projects that we do not check for Android API level 14 check due to various limitations
24 val androidNonCompatibleProjects = setOf(
25 "kotlinx-coroutines-debug",
26 "kotlinx-coroutines-swing",
27 "kotlinx-coroutines-javafx",
28 "kotlinx-coroutines-jdk8",
29 "kotlinx-coroutines-jdk9",
30 "kotlinx-coroutines-reactor",
31 "kotlinx-coroutines-test"
32 )
33