[Gradle, JS] Disambiguation classifier consider single platform plugin

This commit is contained in:
Ilya Goncharov
2020-02-18 13:36:52 +03:00
parent 4189bc88c2
commit ecb89ad259
6 changed files with 18 additions and 11 deletions
@@ -30,5 +30,11 @@ enum class JsCompilerType : Named, Serializable {
}
}
fun String.removeCapitalizedJsCompilerSuffix(compilerType: JsCompilerType): String =
removeSuffix(compilerType.name.capitalize())
fun String.removeJsCompilerSuffix(compilerType: JsCompilerType): String {
val truncatedString = removeSuffix(compilerType.name)
if (this != truncatedString) {
return truncatedString
}
return removeSuffix(compilerType.name.capitalize())
}