diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2021-09-24 17:23:00 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-09-28 20:03:12 +0000 |
commit | da28abee08e06eb2c4220304aa7771f92371b048 (patch) | |
tree | f46db75b185ba280c86419d0febee090d669a47f /server/sonar-docs/build.gradle | |
parent | 5a3c534591e01f75ee82a0ccc0d4219bcce61167 (diff) | |
download | sonarqube-da28abee08e06eb2c4220304aa7771f92371b048.tar.gz sonarqube-da28abee08e06eb2c4220304aa7771f92371b048.zip |
Avoid unnecessary yarn install runs
Diffstat (limited to 'server/sonar-docs/build.gradle')
-rw-r--r-- | server/sonar-docs/build.gradle | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle index 0a60cb45dd5..01fd51bdbea 100644 --- a/server/sonar-docs/build.gradle +++ b/server/sonar-docs/build.gradle @@ -67,6 +67,10 @@ yarn_run { outputs.cacheIf { true } args = ['build'] } +build.dependsOn(yarn_run) + +avoidYarnInstallIfPossible(tasks, yarn, yarn_run); + // To clean outputs outside of "build" directory: clean.dependsOn(cleanYarn_run) @@ -97,12 +101,15 @@ clean.dependsOn(cleanYarn_run) dependsOn(yarn) } +avoidYarnInstallIfPossible(tasks, yarn, tasks.getByName("yarn_validate-ci")); + // Check for known vulnerabilities task dependency_audit(type: Exec) { inputs.file('package.json') outputs.cacheIf { false } commandLine 'yarn', 'npm', 'audit', '--environment', 'production', '--severity', 'high' ignoreExitValue = true + dependsOn(yarn) } |