2016-04-25 19:21:05 -04:00
|
|
|
import org.elasticsearch.gradle.VersionProperties
|
|
|
|
|
2015-11-23 17:45:24 -05:00
|
|
|
if (project.projectDir.name != 'x-plugins') {
|
|
|
|
throw new GradleException('You must checkout x-plugins in a directory named x-plugins next to elasticsearch')
|
2015-11-16 15:45:03 -05:00
|
|
|
}
|
|
|
|
|
2016-02-04 16:07:01 -05:00
|
|
|
subprojects {
|
|
|
|
// we must not publish to sonatype until we have set up x-plugins to only publish the parts we want to publish!
|
2016-02-04 16:21:18 -05:00
|
|
|
project.afterEvaluate {
|
2016-04-15 11:15:19 -04:00
|
|
|
if (project.plugins.hasPlugin('com.bmuschko.nexus') && project.nexus.repositoryUrl.startsWith('file://') == false) {
|
2016-02-04 16:21:18 -05:00
|
|
|
uploadArchives.enabled = false
|
|
|
|
}
|
2016-02-04 16:07:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-25 19:21:05 -04:00
|
|
|
task bundleXPack(type: Zip) {
|
|
|
|
dependsOn 'elasticsearch:x-pack:bundlePlugin'
|
|
|
|
dependsOn 'kibana:npmPackage'
|
|
|
|
from { zipTree(project('elasticsearch:x-pack').bundlePlugin.outputs.files.singleFile) }
|
|
|
|
from { zipTree(project('kibana').npmPackage.outputs.files.singleFile) }
|
|
|
|
destinationDir file('build/distributions')
|
|
|
|
baseName = 'x-pack'
|
|
|
|
version = VersionProperties.elasticsearch
|
|
|
|
}
|
2015-10-29 14:44:48 -04:00
|
|
|
|
2016-04-25 19:21:05 -04:00
|
|
|
task assemble(dependsOn: bundleXPack) {
|
|
|
|
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'
|
2015-10-29 14:44:48 -04:00
|
|
|
}
|