From: Steve Marion Date: Wed, 28 Aug 2024 11:10:23 +0000 (+0200) Subject: SONAR-19710 add missing dependency between cyclonedx and zip on sonar-application X-Git-Tag: 10.7.0.96327~152 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6886098404b68f5d5cf2ffd50ef03ed5f519a79f;p=sonarqube.git SONAR-19710 add missing dependency between cyclonedx and zip on sonar-application --- 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