2016-04-25 19:21:05 -04:00
|
|
|
import org.elasticsearch.gradle.VersionProperties
|
2016-09-29 06:03:14 -04:00
|
|
|
import org.elasticsearch.gradle.precommit.LicenseHeadersTask
|
2016-04-25 19:21:05 -04:00
|
|
|
|
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 {
|
2016-11-24 03:05:15 -05:00
|
|
|
plugins.withType(MavenPublishPlugin).whenPluginAdded {
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
// add license information to generated poms
|
|
|
|
all {
|
|
|
|
pom.withXml { XmlProvider xml ->
|
|
|
|
Node node = xml.asNode()
|
|
|
|
|
|
|
|
Node license = node.appendNode('licenses').appendNode('license')
|
|
|
|
license.appendNode('name', 'Elastic Commercial Software End User License Agreement')
|
|
|
|
license.appendNode('url', 'https://www.elastic.co/eula/')
|
|
|
|
license.appendNode('distribution', 'repo')
|
|
|
|
|
|
|
|
Node developer = node.appendNode('developers').appendNode('developer')
|
|
|
|
developer.appendNode('name', 'Elastic')
|
|
|
|
developer.appendNode('url', 'http://www.elastic.co')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-02-04 16:21:18 -05:00
|
|
|
}
|
2016-02-04 16:07:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-24 03:05:15 -05:00
|
|
|
|
2016-04-26 17:18:45 -04:00
|
|
|
task bundlePack(type: Zip) {
|
2016-05-23 14:34:51 -04:00
|
|
|
onlyIf { project('kibana').bundlePlugin.enabled }
|
2016-10-01 03:46:43 -04:00
|
|
|
dependsOn 'elasticsearch:bundlePlugin'
|
2016-04-26 17:18:45 -04:00
|
|
|
dependsOn 'kibana:bundlePlugin'
|
2016-10-01 03:46:43 -04:00
|
|
|
from { zipTree(project('elasticsearch').bundlePlugin.outputs.files.singleFile) }
|
2016-04-26 17:18:45 -04:00
|
|
|
from { zipTree(project('kibana').bundlePlugin.outputs.files.singleFile) }
|
2016-04-25 19:21:05 -04:00
|
|
|
destinationDir file('build/distributions')
|
|
|
|
baseName = 'x-pack'
|
|
|
|
version = VersionProperties.elasticsearch
|
|
|
|
}
|
2015-10-29 14:44:48 -04:00
|
|
|
|
2016-04-26 17:18:45 -04:00
|
|
|
task assemble(dependsOn: bundlePack) {
|
2016-04-25 19:21:05 -04:00
|
|
|
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
|
|
|
}
|
2016-09-29 06:03:14 -04:00
|
|
|
|
|
|
|
File checkstyleSuppressions = file('dev-tools/checkstyle_suppressions.xml')
|
|
|
|
subprojects {
|
|
|
|
tasks.withType(Checkstyle) {
|
|
|
|
inputs.file(checkstyleSuppressions)
|
|
|
|
// Use x-pack specific suppressions file rather than the open source one.
|
|
|
|
configProperties = [
|
|
|
|
suppressions: checkstyleSuppressions
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(LicenseHeadersTask.class) {
|
|
|
|
approvedLicenses = ['Elasticsearch Confidential']
|
|
|
|
additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL'
|
|
|
|
}
|
2016-10-01 03:46:43 -04:00
|
|
|
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-plugins:elasticsearch' ]
|
2016-09-29 06:03:14 -04:00
|
|
|
}
|