Vsevolod Tolstopyatov | 41a2e30 | 2021-02-04 07:16:48 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| 3 | */ |
| 4 | |
Victor Turansky | de38890 | 2020-05-02 14:22:30 +0300 | [diff] [blame] | 5 | import org.gradle.api.Project |
| 6 | |
Vsevolod Tolstopyatov | fcaa6df | 2020-08-24 18:57:22 +0300 | [diff] [blame] | 7 | // Use from Groovy for now |
Victor Turansky | de38890 | 2020-05-02 14:22:30 +0300 | [diff] [blame] | 8 | fun platformOf(project: Project): String = |
| 9 | when (project.name.substringAfterLast("-")) { |
| 10 | "js" -> "js" |
| 11 | "common", "native" -> throw IllegalStateException("${project.name} platform is not supported") |
| 12 | else -> "jvm" |
| 13 | } |