Add assembleAll task

It helps to stop build before createInstallationZip task.
This commit is contained in:
Johannes Obermayr 2023-07-03 17:44:19 +02:00
parent c66ad6b047
commit beb27c99ad

View File

@ -481,40 +481,25 @@ def updateSlaFilesTimestamp(String distributionDirectoryPath, int timeOffsetMinu
}
/*********************************************************************************
*
* Creates the local installation zip.
*
* Assemble all targets.
*
**********************************************************************************/
task createInstallationZip(type: Zip) { t ->
task assembleAll() {
group 'private'
description "Creates local installation zip (does not clean up artifacts) [gradle/root/distribution.gradle]"
description "Assembles all targets to one installation directory (does not clean up artifacts) [gradle/root/distribution.gradle]"
dependsOn assembleDistribution
dependsOn assembleSource
dependsOn "assembleDistribution_$currentPlatform"
if (project.hasProperty("allPlatforms")) {
project.PLATFORMS.each { platform ->
dependsOn ":assembleDistribution_${platform.name}"
}
}
if (project.hasProperty("allPlatforms")) {
archiveFileName = "${ZIP_NAME_PREFIX}.zip"
}
else {
archiveFileName = "${ZIP_NAME_PREFIX}_${currentPlatform}.zip"
}
destinationDirectory = DISTRIBUTION_DIR
// Make sure that we don't try to copy the same file with the same path.
duplicatesStrategy 'exclude'
from (DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX) {
into ZIP_DIR_PREFIX
}
doFirst {
// We always want the extensions directory to exist in the zip, even if there's nothing
// installed there.
@ -529,6 +514,34 @@ task createInstallationZip(type: Zip) { t ->
// two minutes.
updateSlaFilesTimestamp(DISTRIBUTION_DIR.getPath(), 2)
}
}
/*********************************************************************************
*
* Creates the local installation zip.
*
**********************************************************************************/
task createInstallationZip(type: Zip) { t ->
group 'private'
description "Creates local installation zip (does not clean up artifacts) [gradle/root/distribution.gradle]"
dependsOn assembleAll
if (project.hasProperty("allPlatforms")) {
archiveFileName = "${ZIP_NAME_PREFIX}.zip"
}
else {
archiveFileName = "${ZIP_NAME_PREFIX}_${currentPlatform}.zip"
}
destinationDirectory = DISTRIBUTION_DIR
// Make sure that we don't try to copy the same file with the same path.
duplicatesStrategy 'exclude'
from (DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX) {
into ZIP_DIR_PREFIX
}
doLast {
delete file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)