forked from elastic/elasticsearch-hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
46 lines (37 loc) · 1.29 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
description = 'Elasticsearch for Apache Hadoop'
apply plugin: 'es.hadoop.build.root'
defaultTasks 'build'
build {
dependsOn 'hadoopTestingJar'
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '4.5'
}
// 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]")
}
}
}
}