1 /* 2 * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 import org.gradle.api.Project 6 7 // Use from Groovy for now platformOfnull8fun 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 } 14