From 6886098404b68f5d5cf2ffd50ef03ed5f519a79f Mon Sep 17 00:00:00 2001 From: Steve Marion Date: Wed, 28 Aug 2024 13:10:23 +0200 Subject: [PATCH] SONAR-19710 add missing dependency between cyclonedx and zip on sonar-application --- sonar-application/build.gradle | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle index 544c2e3fc3d..8ca63715f70 100644 --- a/sonar-application/build.gradle +++ b/sonar-application/build.gradle @@ -336,15 +336,18 @@ task zip(type: Zip, dependsOn: [configurations.compileClasspath]) { } // Check the size of the archive -zip.doLast { - def minLength = 340000000 - def maxLength = 748000000 - - def length = archiveFile.get().asFile.length() - if (length < minLength) - throw new GradleException("${archiveFileName.get()} size ($length) too small. Min is $minLength") - if (length > maxLength) - throw new GradleException("${destinationDirectory.get()}/${archiveFileName.get()} size ($length) too large. Max is $maxLength") +zip { + mustRunAfter cyclonedxBom + doLast { + def minLength = 340000000 + def maxLength = 748000000 + + def length = archiveFile.get().asFile.length() + if (length < minLength) + throw new GradleException("${archiveFileName.get()} size ($length) too small. Min is $minLength") + if (length > maxLength) + throw new GradleException("${destinationDirectory.get()}/${archiveFileName.get()} size ($length) too large. Max is $maxLength") + } } assemble.dependsOn zip -- 2.39.5