From cc40387788f9fc92561112f1824f5d235b7362fa Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 4 Sep 2019 21:45:04 +0200 Subject: [PATCH] YarnSetupTask: Remove a too coarse "onlyIf" in the "init" block "installationDir" is the non-version specific top-level Yarn installation directory simply called "yarn". Checking for its existence is not sufficient to be able to skip the task, as another version than the requested one could be installed below the "yarn" directory. Instead of taking the version into account in this check, simply remove it as the version-specific installation directory at "env.home" is already marked as an "OutputDirectory", so Gradle itself already takes care of skipping task execution if the output files were created before. --- .../jetbrains/kotlin/gradle/targets/js/yarn/YarnSetupTask.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnSetupTask.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnSetupTask.kt index 0a103ad625f..c8cdeb0d3d3 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnSetupTask.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnSetupTask.kt @@ -28,10 +28,6 @@ open class YarnSetupTask : DefaultTask() { init { group = NodeJsRootPlugin.TASKS_GROUP_NAME description = "Download and install a local yarn version" - - onlyIf { - !settings.installationDir.exists() - } } @TaskAction