commit | de38890abb4300206d25d8620b84eeffe30f289a | [log] [tgz] |
---|---|---|
author | Victor Turansky <victor.turansky@gmail.com> | Sat May 02 14:22:30 2020 +0300 |
committer | GitHub <noreply@github.com> | Sat May 02 14:22:30 2020 +0300 |
tree | 37666212b2cd28989928935b866d16e976074950 | |
parent | 1beebf10049077e6d183c564db963e7718f1691f [diff] |
Platform util in 'buildSrc' (#1969)
diff --git a/buildSrc/src/main/kotlin/Platform.kt b/buildSrc/src/main/kotlin/Platform.kt new file mode 100644 index 0000000..4cacd9e --- /dev/null +++ b/buildSrc/src/main/kotlin/Platform.kt
@@ -0,0 +1,8 @@ +import org.gradle.api.Project + +fun platformOf(project: Project): String = + when (project.name.substringAfterLast("-")) { + "js" -> "js" + "common", "native" -> throw IllegalStateException("${project.name} platform is not supported") + else -> "jvm" + }