forked from Netflix/aegisthus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
162 lines (136 loc) · 4.86 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:gradle-info-plugin:3.+'
}
}
plugins {
id 'nebula.netflixoss' version '3.2.3'
}
ext {
githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name
hadoopVersion = project.hasProperty('hadoopVersion') ? hadoopVersion : '2.4.1'
}
subprojects {
apply plugin: 'nebula.netflixoss'
apply plugin: 'java'
apply plugin: 'nebula.info'
configurations {
includeInJar
}
repositories {
mavenLocal()
jcenter()
}
tasks.withType(JavaCompile) {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
group = "com.netflix.${githubProjectName}" // TEMPLATE: Set to organization of project
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'com.tngtech.java:junit-dataprovider:1.10.2'
}
test {
minHeapSize = "128m"
maxHeapSize = "1024m"
afterTest { desc, result ->
println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
testLogging {
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
}
}
}
}
}
project(':aegisthus-distcp') {
configurations.includeInJar {
transitive = false
}
configurations.compile.extendsFrom(configurations.includeInJar)
dependencies {
includeInJar project(':aegisthus-core')
includeInJar 'org.xerial.snappy:snappy-java:1.0.4.1'
}
jar {
from { configurations.includeInJar.collect { it.isDirectory() ? it : zipTree(it) } }
}
}
project(':aegisthus-core') {
configurations.compile.extendsFrom(configurations.includeInJar)
dependencies {
compile 'org.apache.pig:pig:0.11.1'
compile 'org.slf4j:slf4j-api:1.7.7'
compile 'org.slf4j:slf4j-log4j12:1.7.7'
includeInJar 'com.fasterxml.jackson.core:jackson-core:2.4.3'
includeInJar 'com.google.guava:guava:15.0'
}
includeHadoopLibs(project)
jar {
from { configurations.includeInJar.collect { it.isDirectory() ? it : zipTree(it) } }
}
}
project(':aegisthus-hadoop') {
apply plugin: 'groovy'
configurations.includeInJar {
transitive = false
}
configurations.compile.extendsFrom(configurations.includeInJar)
dependencies {
includeInJar project(':aegisthus-core')
includeInJar project(':aegisthus-distcp')
compile 'org.apache.pig:pig:0.11.1'
includeInJar 'com.netflix.rxjava:rxjava-core:0.19.6'
includeInJar 'org.apache.cassandra:cassandra-all:2.0.10'
compile 'org.apache.avro:avro:1.7.4'
includeInJar 'org.apache.avro:avro-mapred:1.7.4:hadoop2'
// cassandra selected transitive deps
includeInJar 'org.apache.thrift:libthrift:0.9.1'
includeInJar 'org.xerial.snappy:snappy-java:1.0.4.1'
includeInJar 'net.jpountz.lz4:lz4:1.2.0'
includeInJar 'org.apache.commons:commons-lang3:3.1'
includeInJar 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3'
includeInJar 'org.antlr:antlr-runtime:3.2'
includeInJar 'com.github.stephenc:jamm:0.2.5'
testCompile project(':aegisthus-core')
testCompile project(':aegisthus-distcp')
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'org.apache.hadoop:hadoop-minicluster:2.4.1'
}
includeHadoopLibs(project)
jar {
from { configurations.includeInJar.collect { it.isDirectory() ? it : zipTree(it) } }
}
}
project(':aegisthus-pig') {
configurations.compile.extendsFrom(configurations.includeInJar)
dependencies {
includeInJar project(':aegisthus-hadoop')
compile 'org.apache.pig:pig:0.11.1'
compile 'joda-time:joda-time:1.6'
}
includeHadoopLibs(project)
jar {
from { configurations.includeInJar.collect { it.isDirectory() ? it : zipTree(it) } }
}
}
// include correct hadoop libraries for version
def includeHadoopLibs(project) {
if (rootProject.hadoopVersion.startsWith('1')) {
project.dependencies {
compile "org.apache.hadoop:hadoop-core:$hadoopVersion"
}
} else {
project.dependencies {
compile "org.apache.hadoop:hadoop-common:$hadoopVersion"
compile "org.apache.hadoop:hadoop-hdfs:$hadoopVersion"
compile "org.apache.hadoop:hadoop-mapreduce-client-core:$hadoopVersion"
compile "org.apache.hadoop:hadoop-mapreduce-client-jobclient:$hadoopVersion"
}
}
}