From 04b8ece673fe9463f36d0cb1116114170af613c5 Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Mon, 15 Aug 2022 08:19:04 +0000 Subject: [PATCH] [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 --- build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 108526fce3b..23a32fa85b1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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().downloadBaseUrl = "https://cache-redirector.jetbrains.com/github.com/yarnpkg/yarn/releases/download" + rootProject.the().yarnLockMismatchReport = + YarnLockMismatchReport.WARNING } } }