Skip to content

Instantly share code, notes, and snippets.

@ido-ran
Created January 24, 2018 13:28
Show Gist options
  • Save ido-ran/7765b9f046fed98b50811d65a125d4b3 to your computer and use it in GitHub Desktop.
Save ido-ran/7765b9f046fed98b50811d65a125d4b3 to your computer and use it in GitHub Desktop.
Gradle script migrated from Maven assembly plugin
configurations {
deploymentZip
}
/**
* deployment-conf simply package the files in `content` directory in zip file.
* That zip file is later consumed by other module to build the installers.
*/
task packageZip(type: Zip) {
// A list of all the folders which needs to be packaged into the output zip.
def folders = [
'conf',
'install',
'server',
'webapps',
'wrapper',
]
// Package each folder into the zip
folders.forEach({folder ->
from (folder) {
into folder
}
})
baseName = 'distribution-template'
}
artifacts {
/**
* We publish the zip file as artifact under the `deploymentZip` configuration.
* This allows other modules to consume this zip file.
*/
deploymentZip packageZip
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment