OpenSearch/elasticsearch/build.gradle

74 lines
2.3 KiB
Groovy
Raw Normal View History

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
String projectGroupPath = project.group.replaceAll("\\.", "/")
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/${projectGroupPath}/ml-cpp/${project.version}/ml-cpp-${project.version}-windows-x86_64.zip"
download "maven/${projectGroupPath}/ml-cpp/${project.version}/ml-cpp-${project.version}-linux-x86_64.zip"
download "maven/${projectGroupPath}/ml-cpp/${project.version}/ml-cpp-${project.version}-darwin-x86_64.zip"
outputs.file(file("${buildDir}/cppDist/ml-cpp-${project.version}-windows-x86_64.zip"))
outputs.file(file("${buildDir}/cppDist/ml-cpp-${project.version}-darwin-x86_64.zip"))
outputs.file(file("${buildDir}/cppDist/ml-cpp-${project.version}-linux-x86_64.zip"))
}
bundlePlugin {
if (project.cppLocalDists) {
String localZipFile = 'ml-cpp-${project.version}-' +
(project.isWindows ? "windows-x86_64" : (project.isMacOsX ? "darwin-x86_64" :
(project.isLinux ? "linux-x86_64" : "sunos-x86_64"))) + ".zip"
from { zipTree(cppLocalDists + '/' + localZipFile) }
} else {
for (outputFile in downloadCppDist.outputs.files) {
from(zipTree(outputFile)) {
duplicatesStrategy 'exclude'
}
}
dependsOn 'downloadCppDist'
}
}