[Gradle, JS] Fix naming from jsMode to jsCompilerType

This commit is contained in:
Ilya Goncharov
2020-02-03 16:58:47 +03:00
parent b30328a766
commit bcd2707fe6
4 changed files with 5 additions and 5 deletions
@@ -6,7 +6,7 @@ import org.jetbrains.kotlin.gradle.tasks.USING_JS_INCREMENTAL_COMPILATION_MESSAG
import org.jetbrains.kotlin.gradle.tasks.USING_JS_IR_BACKEND_MESSAGE import org.jetbrains.kotlin.gradle.tasks.USING_JS_IR_BACKEND_MESSAGE
import org.jetbrains.kotlin.gradle.util.getFileByName import org.jetbrains.kotlin.gradle.util.getFileByName
import org.jetbrains.kotlin.gradle.util.getFilesByNames import org.jetbrains.kotlin.gradle.util.getFilesByNames
import org.jetbrains.kotlin.gradle.util.jsMode import org.jetbrains.kotlin.gradle.util.jsCompilerType
import org.jetbrains.kotlin.gradle.util.modify import org.jetbrains.kotlin.gradle.util.modify
import org.junit.Assume.assumeFalse import org.junit.Assume.assumeFalse
import org.junit.Test import org.junit.Test
@@ -510,7 +510,7 @@ abstract class AbstractKotlin2JsGradlePluginIT(private val irBackend: Boolean) :
gradleSettingsScript().modify(::transformBuildScriptWithPluginsDsl) gradleSettingsScript().modify(::transformBuildScriptWithPluginsDsl)
if (!irBackend) { if (!irBackend) {
gradleProperties().appendText(jsMode(JsCompilerType.legacy)) gradleProperties().appendText(jsCompilerType(JsCompilerType.legacy))
} }
build("build") { build("build") {
@@ -2310,7 +2310,7 @@ class NewMultiplatformIT : BaseGradleIT() {
setupWorkingDir() setupWorkingDir()
gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl) gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)
if (!jsIr) { if (!jsIr) {
gradleProperties().appendText(jsMode(JsCompilerType.legacy)) gradleProperties().appendText(jsCompilerType(JsCompilerType.legacy))
} }
val tasks = listOf("jvm", "js", nativeHostTargetName).map { ":compileIntegrationTestKotlin${it.capitalize()}" } val tasks = listOf("jvm", "js", nativeHostTargetName).map { ":compileIntegrationTestKotlin${it.capitalize()}" }
@@ -40,7 +40,7 @@ class VariantAwareDependenciesIT : BaseGradleIT() {
assertContains(">> :${innerProject.projectName}:runtime --> sample-lib-nodejs-1.0.klib") assertContains(">> :${innerProject.projectName}:runtime --> sample-lib-nodejs-1.0.klib")
} }
gradleProperties().appendText(jsMode(JsCompilerType.legacy)) gradleProperties().appendText(jsCompilerType(JsCompilerType.legacy))
testResolveAllConfigurations( testResolveAllConfigurations(
subproject = innerProject.projectName, subproject = innerProject.projectName,
@@ -7,5 +7,5 @@ package org.jetbrains.kotlin.gradle.util
import org.jetbrains.kotlin.gradle.targets.js.JsCompilerType import org.jetbrains.kotlin.gradle.targets.js.JsCompilerType
fun jsMode(compilerType: JsCompilerType) = fun jsCompilerType(compilerType: JsCompilerType) =
"\n${JsCompilerType.jsCompilerProperty}=$compilerType" "\n${JsCompilerType.jsCompilerProperty}=$compilerType"