Adds ability to build a pack zip in gradle (elastic/elasticsearch#356)
Original commit: elastic/x-pack-elasticsearch@87d6750fc5
This commit is contained in:
parent
15e8cf7bcb
commit
15c9e8baa4
28
build.gradle
28
build.gradle
|
@ -3,6 +3,7 @@ description = 'Builds the Prelert Engine native binaries and Java classes'
|
|||
import org.gradle.internal.os.OperatingSystem
|
||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
import org.elasticsearch.gradle.precommit.LicenseHeadersTask
|
||||
import org.elasticsearch.gradle.VersionProperties
|
||||
|
||||
configurations.all {
|
||||
// check for updates every build
|
||||
|
@ -37,6 +38,33 @@ subprojects {
|
|||
}
|
||||
}
|
||||
|
||||
task bundlePack(type: Zip) {
|
||||
onlyIf { project('kibana').bundlePlugin.enabled }
|
||||
dependsOn 'elasticsearch:bundlePlugin'
|
||||
dependsOn 'kibana:bundlePlugin'
|
||||
from { zipTree(project('elasticsearch').bundlePlugin.outputs.files.singleFile) }
|
||||
from { zipTree(project('kibana').bundlePlugin.outputs.files.singleFile) }
|
||||
destinationDir file('build/distributions')
|
||||
baseName = 'prelert'
|
||||
version = VersionProperties.elasticsearch
|
||||
}
|
||||
|
||||
task assemble(dependsOn: bundlePack) {
|
||||
group = 'Build'
|
||||
description = 'Assembles the outputs of this project.'
|
||||
}
|
||||
|
||||
task build(dependsOn: assemble) {
|
||||
group = 'Build'
|
||||
description = 'Assembles and tests this project.'
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
group = 'Build'
|
||||
description = 'Deletes the build directory'
|
||||
delete 'build'
|
||||
}
|
||||
|
||||
boolean isLinux = OperatingSystem.current().isLinux()
|
||||
boolean isMacOsX = OperatingSystem.current().isMacOsX()
|
||||
boolean isWindows = OperatingSystem.current().isWindows()
|
||||
|
|
Loading…
Reference in New Issue