[Gradle, JS] Add warning reporting about yarn.lock changes

yarn.lock can be changed during the build. It means that gradle plugin contain new versions of npm dependencies and yarn.lock should be updated to be actual. From the other side, we have bootstrap checks, and before bootstrap update following bootstrap gradle plugin can contain following changes in Gradle plugin, and in bootstrap checks yarn.lock is not actual.
So when we update NPM versions, we get one of following situations: yarn.lock is actual either in ordinary build or in bootstrap one, and never is actual in both situation
This commit is contained in:
Ilya Goncharov
2022-08-15 08:19:04 +00:00
committed by Space
parent eb3bbc3265
commit 04b8ece673
+3
View File
@@ -1,5 +1,6 @@
import org.gradle.crypto.checksum.Checksum
import org.gradle.plugins.ide.idea.model.IdeaModel
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockMismatchReport
buildscript {
val cacheRedirectorEnabled = findProperty("cacheRedirectorEnabled")?.toString()?.toBoolean() == true
@@ -852,6 +853,8 @@ afterEvaluate {
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().downloadBaseUrl =
"https://cache-redirector.jetbrains.com/github.com/yarnpkg/yarn/releases/download"
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().yarnLockMismatchReport =
YarnLockMismatchReport.WARNING
}
}
}