From a1f4e05f8490aaff499d8777c72d0f9a3b1c40e5 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 28 Mar 2018 19:50:43 +0200 Subject: [PATCH] Compatibility of start.sh with incremental build of zip --- sonar-application/build.gradle | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle index 7affae56cdf..6971735c8e3 100644 --- a/sonar-application/build.gradle +++ b/sonar-application/build.gradle @@ -132,9 +132,22 @@ zip.doLast { if (length > maxLength) throw new GradleException("$distsDir/$archiveName size ($length) too large. Max is $maxLength") } - assemble.dependsOn zip +// the script start.sh unzips distribution into $buildDir/distributions. +// This directory should be deleted when the zip is changed. +task cleanLocalUnzippedDir(dependsOn: zip) { + def unzippedDir = file("$buildDir/distributions/sonarqube-$version") + inputs.files(file("$buildDir/distributions/sonar-application-${version}.zip")) + outputs.upToDateWhen { true } + + doLast { + println("delete directory ${unzippedDir}") + project.delete(unzippedDir) + } +} +assemble.dependsOn cleanLocalUnzippedDir + artifactoryPublish.skip = false publishing { -- 2.39.5