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"
+    }