[Gradle, JS] Rename public KotlinJsCompilerType
This commit is contained in:
+4
-4
@@ -10,7 +10,7 @@ import java.io.Serializable
|
||||
|
||||
// For Gradle attributes
|
||||
@Suppress("EnumEntryName")
|
||||
enum class JsCompilerType : Named, Serializable {
|
||||
enum class KotlinJsCompilerType : Named, Serializable {
|
||||
legacy,
|
||||
ir,
|
||||
both;
|
||||
@@ -24,13 +24,13 @@ enum class JsCompilerType : Named, Serializable {
|
||||
companion object {
|
||||
const val jsCompilerProperty = "kotlin.js.compiler"
|
||||
|
||||
fun byArgument(argument: String): JsCompilerType? =
|
||||
JsCompilerType
|
||||
fun byArgument(argument: String): KotlinJsCompilerType? =
|
||||
KotlinJsCompilerType
|
||||
.values().firstOrNull { it.name.equals(argument, ignoreCase = true) }
|
||||
}
|
||||
}
|
||||
|
||||
fun String.removeJsCompilerSuffix(compilerType: JsCompilerType): String {
|
||||
fun String.removeJsCompilerSuffix(compilerType: KotlinJsCompilerType): String {
|
||||
val truncatedString = removeSuffix(compilerType.name)
|
||||
if (this != truncatedString) {
|
||||
return truncatedString
|
||||
+1
-1
@@ -6,5 +6,5 @@
|
||||
package org.jetbrains.kotlin.gradle.plugin
|
||||
|
||||
interface KotlinJsCompilerTypeHolder {
|
||||
val defaultJsCompilerType: JsCompilerType
|
||||
val defaultJsCompilerType: KotlinJsCompilerType
|
||||
}
|
||||
Reference in New Issue
Block a user