[Gradle, JS] Use yarn.lock name by default

This commit is contained in:
Ilya Goncharov
2021-11-08 13:37:07 +03:00
committed by TeamCityServer
parent d9f5ef2f91
commit c464cabd44
2 changed files with 9 additions and 5 deletions
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.gradle.tasks.USING_JS_IR_BACKEND_MESSAGE
import org.jetbrains.kotlin.gradle.testbase.*
import org.jetbrains.kotlin.gradle.util.jsCompilerType
import org.jetbrains.kotlin.gradle.util.normalizePath
import org.junit.Test
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.condition.DisabledIf
@@ -1052,8 +1051,13 @@ class GeneralKotlin2JsGradlePluginIT : KGPBaseTest() {
project("cleanTask", gradleVersion) {
buildGradle.modify(::transformBuildScriptWithPluginsDsl)
build("assemble") {
assertFileExists(projectPath.resolve("kotlin-yarn.lock"))
assert(projectPath.resolve("kotlin-yarn.lock").readText() == projectPath.resolve("build/js/yarn.lock").readText())
assertFileExists(projectPath.resolve("kotlin-js-store").resolve("yarn.lock"))
assert(
projectPath
.resolve("kotlin-js-store")
.resolve("yarn.lock")
.readText() == projectPath.resolve("build/js/yarn.lock").readText()
)
}
}
}
@@ -39,8 +39,8 @@ open class YarnRootExtension(
var command by Property("yarn")
var download by Property(true)
var lockFileName by Property("kotlin-yarn.lock")
var lockFileDirectory: File by Property(project.rootDir)
var lockFileName by Property("yarn.lock")
var lockFileDirectory: File by Property(project.rootDir.resolve("kotlin-js-store"))
var ignoreScripts by Property(true)