aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/Platform.kt
blob: b667a138a8607db18e39a51dececcbca09074042 (plain)
1
2
3
4
5
6
7
8
9
import org.gradle.api.Project

// Use from Groovy for now
fun platformOf(project: Project): String =
    when (project.name.substringAfterLast("-")) {
        "js" -> "js"
        "common", "native" -> throw IllegalStateException("${project.name} platform is not supported")
        else -> "jvm"
    }