Adds ability to build a pack zip in gradle (elastic/elasticsearch#356)

Original commit: elastic/x-pack-elasticsearch@87d6750fc5
This commit is contained in:
Colin Goodheart-Smithe 2016-11-22 08:29:13 +00:00 committed by GitHub
parent 15e8cf7bcb
commit 15c9e8baa4
1 changed files with 29 additions and 1 deletions

View File

@ -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()
@ -83,7 +111,7 @@ task cppAll {
subprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
buildscript {
repositories {
if (System.getProperty("repos.mavenlocal") != null) {