]> source.dussan.org Git - sonarqube.git/commitdiff
Build task ":server:sonar-docs:clean" should depend on ":server:sonar-docs:cleanYarn_run"
authorEvgeny Mandrikov <mandrikov@gmail.com>
Tue, 25 Jun 2019 14:13:16 +0000 (16:13 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Jun 2019 06:45:51 +0000 (08:45 +0200)
Because output directory of last one is outside of standard "build" directory.

server/sonar-docs/build.gradle

index e74d4553aaa5ed6be0024d63fe4bee9463d56d54..51b967e54be3fd930e151b33defc8c0322ee98bb 100644 (file)
@@ -8,10 +8,6 @@ sonarqube {
 
 group = 'com.sonarsource.sonarqube'
 
-clean.doFirst {
-  delete "${project.buildDir}/public/"
-}
-
 yarn_run {
   def docsVersion = version.split("[.-]").take(2).join('.')
   environment = [ GATSBY_DOCS_VERSION: docsVersion ]
@@ -24,6 +20,8 @@ yarn_run {
   outputs.cacheIf { true }
   args = ['build']
 }
+// To clean outputs outside of "build" directory:
+clean.dependsOn(cleanYarn_run)
 
 "yarn_validate-ci" {
   // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized