2018-01-27 00:48:30 -05:00
|
|
|
evaluationDependsOn(xpackModule('core'))
|
2018-01-22 10:55:03 -05:00
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
2020-05-12 00:06:04 -04:00
|
|
|
apply plugin: 'elasticsearch.internal-cluster-test'
|
2018-01-20 00:30:17 -05:00
|
|
|
esplugin {
|
2019-11-14 06:01:23 -05:00
|
|
|
name 'x-pack-ml'
|
|
|
|
description 'Elasticsearch Expanded Pack Plugin - Machine Learning'
|
|
|
|
classname 'org.elasticsearch.xpack.ml.MachineLearning'
|
|
|
|
hasNativeController true
|
|
|
|
extendedPlugins = ['x-pack-core', 'lang-painless']
|
2018-01-20 00:30:17 -05:00
|
|
|
}
|
2017-12-08 11:41:32 -05:00
|
|
|
|
2019-05-04 12:43:14 -04:00
|
|
|
|
|
|
|
repositories {
|
2019-11-14 06:01:23 -05:00
|
|
|
ivy {
|
|
|
|
name "ml-cpp"
|
|
|
|
url System.getProperty('build.ml_cpp.repo', 'https://prelert-artifacts.s3.amazonaws.com')
|
|
|
|
metadataSources {
|
|
|
|
// no repository metadata, look directly for the artifact
|
|
|
|
artifact()
|
2019-05-04 12:43:14 -04:00
|
|
|
}
|
2019-11-14 06:01:23 -05:00
|
|
|
patternLayout {
|
|
|
|
artifact "maven/org/elasticsearch/ml/ml-cpp/[revision]/ml-cpp-[revision].[ext]"
|
|
|
|
}
|
|
|
|
}
|
2019-05-04 12:43:14 -04:00
|
|
|
}
|
|
|
|
|
2017-12-08 11:41:32 -05:00
|
|
|
configurations {
|
2019-11-14 06:01:23 -05:00
|
|
|
nativeBundle {
|
|
|
|
resolutionStrategy.dependencySubstitution {
|
|
|
|
if (findProject(':ml-cpp') != null) {
|
|
|
|
substitute module("org.elasticsearch.ml:ml-cpp") with project(":ml-cpp")
|
|
|
|
}
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
2019-11-14 06:01:23 -05:00
|
|
|
resolutionStrategy.cacheChangingModulesFor 2, 'hours'
|
|
|
|
}
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
bundlePlugin {
|
2019-11-14 06:01:23 -05:00
|
|
|
dependsOn configurations.nativeBundle
|
|
|
|
from {
|
|
|
|
project.zipTree(configurations.nativeBundle.singleFile)
|
|
|
|
}
|
2018-01-20 00:30:17 -05:00
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
// We don't ship the individual nativeBundle licenses - instead
|
|
|
|
// they get combined into the top level NOTICES file we ship
|
|
|
|
exclude 'platform/licenses/**'
|
2018-01-20 00:30:17 -05:00
|
|
|
}
|
|
|
|
|
2017-12-08 11:41:32 -05:00
|
|
|
dependencies {
|
2019-11-14 06:01:23 -05:00
|
|
|
compileOnly project(':modules:lang-painless:spi')
|
|
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
testImplementation project(path: xpackModule('ilm'), configuration: 'default')
|
2019-11-14 06:01:23 -05:00
|
|
|
// This should not be here
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(path: xpackModule('security'), configuration: 'testArtifacts')
|
2017-12-08 11:41:32 -05:00
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
// ml deps
|
|
|
|
compile project(':libs:elasticsearch-grok')
|
|
|
|
compile "com.ibm.icu:icu4j:${versions.icu4j}"
|
|
|
|
compile "net.sf.supercsv:super-csv:${versions.supercsv}"
|
|
|
|
nativeBundle("org.elasticsearch.ml:ml-cpp:${project.version}@zip") {
|
|
|
|
changing = true
|
|
|
|
}
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation 'org.ini4j:ini4j:0.5.2'
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
2018-01-25 04:38:34 -05:00
|
|
|
configurations {
|
2019-11-14 06:01:23 -05:00
|
|
|
testArtifacts.extendsFrom testRuntime
|
2020-06-14 16:30:44 -04:00
|
|
|
testArtifacts.extendsFrom testImplementation
|
2018-01-25 04:38:34 -05:00
|
|
|
}
|
|
|
|
task testJar(type: Jar) {
|
2019-11-14 06:01:23 -05:00
|
|
|
appendix 'test'
|
|
|
|
from sourceSets.test.output
|
2018-01-25 04:38:34 -05:00
|
|
|
}
|
|
|
|
artifacts {
|
2019-11-14 06:01:23 -05:00
|
|
|
// normal es plugins do not publish the jar but we need to since users need it for Transport Clients and extensions
|
|
|
|
archives jar
|
|
|
|
testArtifacts testJar
|
2018-01-25 04:38:34 -05:00
|
|
|
}
|
|
|
|
|
2018-04-30 15:05:27 -04:00
|
|
|
task extractNativeLicenses(type: Copy) {
|
2019-11-14 06:01:23 -05:00
|
|
|
dependsOn configurations.nativeBundle
|
|
|
|
into "${buildDir}"
|
|
|
|
from {
|
|
|
|
project.zipTree(configurations.nativeBundle.singleFile)
|
|
|
|
}
|
|
|
|
include 'platform/licenses/**'
|
2018-04-30 15:05:27 -04:00
|
|
|
}
|
|
|
|
project.afterEvaluate {
|
2019-11-14 06:01:23 -05:00
|
|
|
// Add an extra licenses directory to the combined notices
|
|
|
|
project.tasks.findByName('generateNotice').dependsOn extractNativeLicenses
|
|
|
|
project.tasks.findByName('generateNotice').licensesDir new File("${project.buildDir}/platform/licenses")
|
|
|
|
project.tasks.findByName('generateNotice').outputs.upToDateWhen {
|
|
|
|
extractNativeLicenses.state.upToDate
|
|
|
|
}
|
2018-04-30 15:05:27 -04:00
|
|
|
}
|
|
|
|
|
2018-01-25 04:38:34 -05:00
|
|
|
// xpack modules are installed in real clusters as the meta plugin, so
|
|
|
|
// installing them as individual plugins for integ tests doesn't make sense,
|
|
|
|
// so we disable integ tests
|
|
|
|
integTest.enabled = false
|
|
|
|
|
2018-08-21 12:23:21 -04:00
|
|
|
// add all sub-projects of the qa sub-project
|
|
|
|
gradle.projectsEvaluated {
|
2019-11-14 06:01:23 -05:00
|
|
|
project.subprojects
|
|
|
|
.find { it.path == project.path + ":qa" }
|
|
|
|
.subprojects
|
|
|
|
.findAll { it.path.startsWith(project.path + ":qa") }
|
|
|
|
.each { check.dependsOn it.check }
|
2018-08-21 12:23:21 -04:00
|
|
|
}
|