-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
172 lines (139 loc) · 4.15 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
163
164
165
166
167
168
169
170
171
172
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
}
}
plugins {
id 'java'
id 'maven'
id 'application'
id 'idea'
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'jacoco'
id 'org.sonarqube' version '2.7'
id 'com.google.protobuf' version '0.8.10'
}
apply plugin: 'java-library'
group = 'net.skyscanner'
version = '1.0-SNAPSHOT'
description = 'OpenTSDB rollups Spark job'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:2.5.0'
}
generatedFilesBaseDir = "$projectDir/gen"
}
clean {
delete protobuf.generatedFilesBaseDir
}
idea {
module {
// proto files and generated Java files are automatically added as
// source dirs.
// If you have additional sources, add them here:
sourceDirs += file("/path/to/other/sources");
}
}
project.ext {
logbackVersion = '1.2.2'
joptVersion = '5.0.4'
snakeyamlVersion = '1.18'
vavrVersion = '0.9.0'
grapplerVersion = '5.5.5'
// The following are dependency versions used by EMR 5.20.0 (in the cloud/pipeline.yml file):
sparkVersion = '2.3.0'
sparkTestingVersion = '2.3.0'
awsVersion = '1.11.461'
guavaVersion = '14.0.1'
hbaseVersion = '1.4.10'
}
mainClassName = "net.skyscanner.opentsdb_rollups.Main"
subprojects {
group = 'net.skyscanner'
apply plugin: 'java'
apply plugin: 'java-library'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
allprojects {
repositories {
maven {
url "https://artifactory.skyscannertools.net/artifactory/maven"
credentials {
username "$SKYSCANNER_ARTIFACTORY_MAVEN_USER"
password "$SKYSCANNER_ARTIFACTORY_MAVEN_PASSWORD"
}
}
maven {
url "https://repository.cloudera.com/artifactory/cloudera-repos/"
}
maven {
url "https://maven.twttr.com/"
}
}
}
dependencies {
api project(path: ':serializer', configuration: 'shadow')
api project(path: ':opentsdb', configuration: 'shadow')
implementation "ch.qos.logback:logback-classic:${logbackVersion}"
implementation "net.sf.jopt-simple:jopt-simple:${joptVersion}"
implementation "org.yaml:snakeyaml:${snakeyamlVersion}"
implementation "io.vavr:vavr:${vavrVersion}"
compileOnly ("org.apache.spark:spark-core_2.11:${sparkVersion}")
compileOnly ("org.apache.spark:spark-sql_2.11:${sparkVersion}")
compileOnly ("org.apache.spark:spark-streaming_2.11:${sparkVersion}")
implementation group: 'org.scala-lang', name: 'scala-library', version: '2.11.8'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
implementation 'org.apache.kafka:kafka-clients:2.3.0'
compile group: 'org.apache.hbase', name: 'hbase', version: "${hbaseVersion}", ext: 'pom'
compile group: 'org.apache.hbase', name: 'hbase-common', version: "${hbaseVersion}"
compile group: 'org.apache.hbase', name: 'hbase-client', version: "${hbaseVersion}"
compile group: 'org.apache.hbase', name: 'hbase-server', version: "${hbaseVersion}"
compile 'org.apache.hadoop:hadoop-aws:2.8.1'
compile 'com.hadoop.gplcompression:hadoop-lzo:0.4.20'
testCompile "org.mockito:mockito-core:2.+"
}
jar {
manifest {
attributes (
"Main-Class": "net.skyscanner.opentsdb_rollups.Main"
)
}
}
configurations {
runtime.exclude group: "org.slf4j", module: "slf4j-log4j12"
runtime.exclude group: "org.slf4j", module: "log4j-over-slf4j"
}
shadowJar {
mergeServiceFiles()
version = null
zip64 true
}
build.dependsOn(shadowJar)
run.doFirst { environment 'SPARK_LOCAL_IP', '127.0.0.1' }
run {
args '--config', 'dev.yml', '--spark-master', 'local[*]'
}
jacoco {
toolVersion = "0.8.3"
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
}
}
configurations.all {
resolutionStrategy {
force "com.google.guava:guava:${guavaVersion}"
}
}