Cleanup RC deprecations in compiler and plugin.
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ interface Conditional {
|
||||
|
||||
|
||||
companion object {
|
||||
val ANNOTATIONS: Map<String, Parser> = listOf<Parser>(JvmVersion, JsVersion, TargetName).toMapBy { it.name }
|
||||
val ANNOTATIONS: Map<String, Parser> = listOf<Parser>(JvmVersion, JsVersion, TargetName).associateBy { it.name }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ data class Modification(val range: TextRange, val apply: (String) -> String)
|
||||
class CollectModificationsVisitor(evaluators: List<Evaluator>) : KtTreeVisitorVoid() {
|
||||
|
||||
val elementModifications: Map<Evaluator, MutableList<Modification>> =
|
||||
evaluators.toMapBy(selector = { it }, transform = { arrayListOf<Modification>() })
|
||||
evaluators.associateBy(keySelector = { it }, valueTransform = { arrayListOf<Modification>() })
|
||||
|
||||
override fun visitDeclaration(declaration: KtDeclaration) {
|
||||
super.visitDeclaration(declaration)
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ fun createJvmProfile(targetRoot: File, version: Int): Profile = Profile("JVM$ver
|
||||
fun createJsProfile(targetRoot: File): Profile = Profile("JS", JsPlatformEvaluator(), File(targetRoot, "js"))
|
||||
|
||||
val profileEvaluators: Map<String, () -> Evaluator> =
|
||||
listOf(6, 7, 8).toMapBy({ version -> "JVM$version" }, { version -> { JvmPlatformEvaluator(version) } }) + ("JS" to { JsPlatformEvaluator() })
|
||||
listOf(6, 7, 8).associateBy({ version -> "JVM$version" }, { version -> { JvmPlatformEvaluator(version) } }) + ("JS" to { JsPlatformEvaluator() })
|
||||
|
||||
fun createProfile(name: String, targetRoot: File): Profile {
|
||||
val (profileName, evaluator) = profileEvaluators.entries.firstOrNull { it.key.equals(name, ignoreCase = true) } ?: throw IllegalArgumentException("Profile with name '$name' is not supported")
|
||||
|
||||
Reference in New Issue
Block a user