import org.elasticsearch.gradle.precommit.PrecommitTasks import org.elastic.gradle.DownloadS3Task apply plugin: 'elasticsearch.esplugin' esplugin { name 'prelert' description 'Prelert Plugin' classname 'org.elasticsearch.xpack.prelert.PrelertPlugin' } 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.cppEnabled == false description = 'download cpp zips from S3 Bucket' bucket 'prelert-artifacts' destDir file("${buildDir}/cppDist") flatten true download "maven/${project.group}/prelert-cpp/${project.version}/prelert-cpp-windows-x86_64-${project.version}.zip" download "maven/${project.group}/prelert-cpp/${project.version}/prelert-cpp-linux-x86_64-${project.version}.zip" download "maven/${project.group}/prelert-cpp/${project.version}/prelert-cpp-darwin-x86_64-${project.version}.zip" outputs.file(file("${buildDir}/cppDist/prelert-cpp-windows-x86_64-${project.version}.zip")) outputs.file(file("${buildDir}/cppDist/prelert-cpp-darwin-x86_64-${project.version}.zip")) outputs.file(file("${buildDir}/cppDist/prelert-cpp-linux-x86_64-${project.version}.zip")) } bundlePlugin { if (project.cppEnabled) { from { zipTree(project(':cpp').buildZip.outputs.files.singleFile) } dependsOn ':cpp:buildZip' } else { for (outputFile in downloadCppDist.outputs.files) { from(zipTree(outputFile)) } dependsOn 'downloadCppDist' } }