forked from flightstats/hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
205 lines (158 loc) · 6.82 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
plugins {
id 'java'
id 'application'
id 'com.google.osdetector' version '1.6.2'
}
if (project.ext.properties.get('isDevBuild') == null) {
project.ext.isDevBuild = !project.ext.properties.containsKey("buildConfig") || !"release".equals(project.ext.buildConfig)
}
repositories {
mavenCentral()
}
sourceSets {
systemTest {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/systemTest/java')
}
resources.srcDir file('src/systemTest/resources')
}
}
configurations {
systemTestCompile.extendsFrom testCompile
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
project.ext.jenkinsBuildNumber = "$System.env.VERSION_NUMBER"
project.ext.jenkinsJobName = "hub-v2"
group = 'com.flightstats'
version = project.ext.jenkinsBuildNumber
project.ext.isDevBuild = !project.ext.properties.containsKey("buildConfig") || !"release".equals(project.ext.buildConfig)
println "Building version: ${version}"
buildDir = 'build'
mainClassName = "com.flightstats.hub.app.SingleHubMain"
task nasTest(type: Test) {
exclude 'com/flightstats/hub/dao/aws/**'
exclude 'com/flightstats/hub/spoke/**'
}
test {
useJUnitPlatform()
testLogging {
events "failed"
}
}
task systemTest(type: Test, description: 'Runs the system tests.', group: 'Verification') {
// Retrieve properties passed in via -D that coincide with system tests. After "systemTest.", names should match those
// found in system-test-hub.properties
systemProperties System.properties.findAll { property ->
property.key.startsWith("systemTest.")
}
systemProperty 'kubernetes.websocket.ping.interval', 30000
useJUnitPlatform()
testLogging {
events "failed"
}
testClassesDirs = sourceSets.systemTest.output.classesDirs
classpath = sourceSets.systemTest.runtimeClasspath
}
wrapper {
gradleVersion = '5.2'
}
configurations {
all*.exclude(group: 'org.slf4j', module: 'slf4j-log4j12')
all*.exclude(group: 'org.slf4j', module: 'slf4j-simple')
all*.exclude(group: 'javax.ws.rs', module: 'jsr311-api')
all*.exclude(module: 'log4j')
integrationTests
}
dependencies {
compile 'org.eclipse.jetty:jetty-server:9.4.8.v20171121'
compile 'org.eclipse.jetty:jetty-servlet:9.4.8.v20171121'
compile 'org.eclipse.jetty:jetty-servlets:9.4.8.v20171121'
compile 'org.eclipse.jetty.websocket:javax-websocket-server-impl:9.4.8.v20171121'
compile 'org.glassfish.jersey.containers:jersey-container-jetty-http:2.26'
compile 'org.glassfish.jersey.core:jersey-common:2.26'
compile 'org.glassfish.jersey.media:jersey-media-sse:2.26'
compile 'org.glassfish.jersey.inject:jersey-hk2:2.26'
compile 'org.glassfish.hk2:guice-bridge:2.5.0'
// TODO: migrate to the Jersey 2 client
compile 'com.sun.jersey:jersey-client:1.19.4'
compile 'com.fasterxml.jackson.core:jackson-core:2.9.3'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.3'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.3'
compile 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.3'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-guava:2.9.3'
compile 'com.google.inject:guice:4.1.0'
compile 'com.google.inject.extensions:guice-servlet:4.1.0'
compile 'com.google.guava:guava:23.5-jre'
compile 'com.diffplug.durian:durian:3.4.0'
compile 'joda-time:joda-time:2.9.9'
compile 'ch.qos.logback:logback-core:1.2.3'
compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'net.logstash.logback:logstash-logback-encoder:4.11'
compile 'org.slf4j:jul-to-slf4j:1.7.25'
compile 'org.slf4j:log4j-over-slf4j:1.7.25'
compile 'org.slf4j:jcl-over-slf4j:1.7.25'
compile 'de.danielbechler:java-object-diff:0.94'
compile 'com.amazonaws:aws-java-sdk:1.11.248'
//todo https://curator.apache.org/zk-compatibility.html
//Curator 4.0 supports ZooKeeper 3.4.x ensembles in a soft-compatibility mode. To use this mode you must exclude ZooKeeper when adding Curator to your dependency management tool.
//You must add a dependency on ZooKeeper 3.4.x also.
compile('org.apache.curator:curator-recipes:4.0.0') {
exclude group: 'org.apache.zookeeper', module: 'zookeeper'
}
compile('org.apache.zookeeper:zookeeper:3.4.11')
//todo curator-test 4.0.0 has a compile issue with QuorumPeerConfig
compile('org.apache.curator:curator-test:2.12.0') {
exclude group: 'org.apache.zookeeper', module: 'zookeeper'
}
compile 'org.apache.commons:commons-lang3:3.7'
compile group: 'org.apache.commons', name: 'commons-text', version: '1.2'
compile 'commons-io:commons-io:2.6'
compile('com.github.rholder:guava-retrying:2.0.0') {
exclude group: 'com.google.guava'
}
compile 'com.google.code.gson:gson:2.8.2'
compile 'de.jkeylockmanager:jkeylockmanager:2.1.0'
compile 'com.datadoghq:java-dogstatsd-client:2.4'
compile 'io.dropwizard.metrics:metrics-core:4.0.0'
compile 'io.dropwizard.metrics:metrics-jvm:4.0.0'
compile 'com.github.davidb:metrics-influxdb:0.9.3'
compile 'com.atlassian.commonmark:commonmark:0.10.0'
compileOnly 'org.projectlombok:lombok:1.18.6'
annotationProcessor 'org.projectlombok:lombok:1.18.6'
testCompileOnly 'org.projectlombok:lombok:1.18.6'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.6'
testCompile 'com.sparkjava:spark-core:2.7.1'
testCompile 'org.hamcrest:hamcrest:2.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
testCompile "org.mockito:mockito-junit-jupiter:2.27.0"
systemTestImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
systemTestCompileOnly 'org.projectlombok:lombok:1.18.6'
systemTestAnnotationProcessor 'org.projectlombok:lombok:1.18.6'
systemTestCompile 'com.squareup.retrofit2:retrofit:2.4.0'
systemTestCompile 'com.squareup.retrofit2:converter-gson:2.5.0'
systemTestCompile 'com.squareup.retrofit2:converter-scalars:2.5.0'
systemTestCompile 'org.awaitility:awaitility:3.0.0'
systemTestCompile 'org.awaitility:awaitility-proxy:3.1.6'
systemTestCompile 'org.glassfish.jersey.containers:jersey-container-servlet-core:2.28'
systemTestCompile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.28'
systemTestCompile('io.netty:netty-tcnative-boringssl-static:2.0.6.Final:' + osdetector.classifier)
systemTestCompile('org.microbean:microbean-helm:2.8.2.1.0.5') {
exclude group: 'io.netty', module: 'netty-tcnative-boringssl-static'
}
systemTestCompile 'com.amazonaws:aws-java-sdk:1.11.248'
}
distTar {
compression = Compression.GZIP
}
applicationDistribution.from('README.md') {
into "doc"
}
applicationDistribution.from('config/conf') {
into "conf"
}
applicationDistribution.from('config/bin') {
into "bin"
}