OpenSearch/elasticsearch/build.gradle

73 lines
2.2 KiB
Groovy

import org.elasticsearch.gradle.precommit.PrecommitTasks
import org.elastic.gradle.DownloadS3Task
apply plugin: 'elasticsearch.esplugin'
esplugin {
name 'ml'
description 'Machine Learning Plugin'
classname 'org.elasticsearch.xpack.ml.MlPlugin'
}
version = project.version
thirdPartyAudit.enabled = false
dependencies {
compile group: 'net.sf.supercsv', name: 'super-csv', version:"${supercsvVersion}"
testCompile group: 'org.ini4j', name: 'ini4j', version:"${ini4jVersion}"
}
test {
exclude '**/*NoBootstrapTests.class'
}
task noBootstrapTest(type: Test,
dependsOn: test.dependsOn) {
classpath = project.test.classpath
testClassesDir = project.test.testClassesDir
include '**/*NoBootstrapTests.class'
}
check.dependsOn noBootstrapTest
noBootstrapTest.mustRunAfter test
integTest {
cluster {
//setting 'useNativeProcess', 'true'
distribution = 'zip'
}
}
integTest.mustRunAfter noBootstrapTest
task downloadCppDist(type: DownloadS3Task) {
enabled project.cppLocalDists == ''
description = 'Download C++ zips from S3 Bucket'
bucket 'prelert-artifacts'
destDir file("${buildDir}/cppDist")
flatten true
download "maven/${project.group}/ml-cpp/${project.version}/ml-cpp-windows-x86_64-${project.version}.zip"
download "maven/${project.group}/ml-cpp/${project.version}/ml-cpp-linux-x86_64-${project.version}.zip"
download "maven/${project.group}/ml-cpp/${project.version}/ml-cpp-darwin-x86_64-${project.version}.zip"
outputs.file(file("${buildDir}/cppDist/ml-cpp-windows-x86_64-${project.version}.zip"))
outputs.file(file("${buildDir}/cppDist/ml-cpp-darwin-x86_64-${project.version}.zip"))
outputs.file(file("${buildDir}/cppDist/ml-cpp-linux-x86_64-${project.version}.zip"))
}
bundlePlugin {
if (project.cppLocalDists) {
String localZipFile = 'ml-cpp-' +
(project.isWindows ? "windows-x86_64" : (project.isMacOsX ? "darwin-x86_64" :
(project.isLinux ? "linux-x86_64" : "sunos-x86_64"))) +
"-${project.version}.zip"
from { zipTree(cppLocalDists + '/' + localZipFile) }
} else {
for (outputFile in downloadCppDist.outputs.files) {
from(zipTree(outputFile)) {
duplicatesStrategy 'exclude'
}
}
dependsOn 'downloadCppDist'
}
}