import org.opensearch.gradle.ConcatFilesTask description = 'OpenSearch for Apache Hadoop' apply plugin: 'opensearch.hadoop.build.root' defaultTasks 'build' allprojects { group = "org.opensearch.client" tasks.withType(AbstractCopyTask) { duplicatesStrategy = DuplicatesStrategy.EXCLUDE } } // Simple utility task to help with downloading artifacts and jars if (project.hasProperty("find-artifact")) { String artifact = project.getProperty("find-artifact") configurations { findJar } dependencies { findJar artifact } task find(type: Copy) { dependsOn configurations.findJar from configurations.findJar.first() into new File(rootProject.buildDir, 'found/') doLast { if (configurations.findJar.files.size() > 0) { String artifactName = configurations.findJar.first().name File found = new File(rootProject.buildDir, 'found/') logger.lifecycle("Found [$artifactName] and stored it in [$found]") if (configurations.findJar.size() > 1) { configurations.findJar.each { logger.lifecycle("Also found other dependencies: [${ it.name }]") } } } else { logger.lifecycle("Could not find artifact [$artifact]") } } } }