From edf7b9c4981ea9a34c23c84359a10961f3a7a8ff Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Mon, 11 Nov 2024 16:35:01 +0100 Subject: [PATCH] Yarn cache-redirector only for root project --- build.gradle.kts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b476f58c5252a..b05b09ba8160f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -741,15 +741,17 @@ tasks { val coreLibsPublishable = coreLibProjects + listOf(":kotlin-stdlib-common") val coreLibsBuildable = coreLibProjects + listOf(":kotlin-stdlib-jvm-minimal-for-test", ":kotlin-stdlib-js-ir-minimal-for-test") - aggregateLibsTask("coreLibsClean", "clean", + aggregateLibsTask( + "coreLibsClean", "clean", (coreLibProjects + coreLibsBuildable + coreLibsPublishable).distinct() + - ":kotlin-stdlib:samples" + ":kotlin-stdlib:samples" ) aggregateLibsTask("coreLibsAssemble", "assemble", coreLibsBuildable) aggregateLibsTask("coreLibsInstall", "install", coreLibsPublishable) aggregateLibsTask("coreLibsPublish", "publish", coreLibsPublishable) - aggregateLibsTask("coreLibsTest", "check", + aggregateLibsTask( + "coreLibsTest", "check", coreLibsBuildable + listOfNotNull( ":kotlin-stdlib:samples", ":kotlin-test:kotlin-test-js-it".takeIf { !kotlinBuildProperties.isInJpsBuildIdeaSync }, @@ -1164,17 +1166,12 @@ plugins.withType(com.github.gradle.node.NodePlugin::class) { } } -@Suppress("DEPRECATION") afterEvaluate { if (kotlinBuildProperties.isCacheRedirectorEnabled) { - allprojects { - plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) { - the().downloadBaseUrl = - "https://cache-redirector.jetbrains.com/github.com/yarnpkg/yarn/releases/download" - } - } - 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 }