forked from reactor/reactor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
372 lines (304 loc) · 9.03 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
/*
* Copyright (c) 2011-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
description = 'Reactor-based application framework for the JVM.'
ext {
gradleVersion = '1.9'
gradleScriptDir = "${rootProject.projectDir}/gradle"
// Languages
groovyVersion = '2.2.1'
// Logging
slf4jVersion = '1.7.5'
logbackVersion = '1.0.13'
// Libraries
disruptorVersion = '3.2.0'
springVersion = '3.2.3.RELEASE'
siVersion = '3.0.0.M2'
nettyVersion = '4.0.11.Final'
jacksonDatabindVersion = '2.2.3'
jsonPathVersion = '0.9.0'
hadoopVersion = '1.1.2'
openHftChronicleVersion = '2.0.2'
openHftLangVersion = '6.1.1'
// Testing
mockitoVersion = '1.9.5'
spockVersion = '0.7-groovy-2.0'
// Code coverage
jacocoVersion = '0.6.2.201302030002'
javadocLinks = [
"http://docs.oracle.com/javase/7/docs/api/",
"http://docs.oracle.com/javaee/6/api/",
"http://fasterxml.github.com/jackson-core/javadoc/2.2.0/",
"http://docs.spring.io/spring/docs/3.2.x/javadoc-api/"
] as String[]
}
buildscript {
repositories {
maven { url "http://repo.spring.io/plugins-release" }
}
dependencies {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.4'
}
}
apply from: "$gradleScriptDir/setup.gradle"
configure(allprojects) { project ->
group = 'org.projectreactor'
apply plugin: 'propdeps'
apply plugin: 'java'
apply plugin: 'groovy'
apply from: "${gradleScriptDir}/ide.gradle"
[compileJava, compileTestJava]*.options*.compilerArgs = [
"-Xlint:serial",
"-Xlint:varargs",
"-Xlint:cast",
"-Xlint:classfile",
"-Xlint:dep-ann",
"-Xlint:divzero",
"-Xlint:empty",
"-Xlint:finally",
"-Xlint:overrides",
"-Xlint:path",
"-Xlint:processing",
"-Xlint:static",
"-Xlint:try",
"-Xlint:-options", // intentionally disabled
"-Xlint:-fallthrough", // intentionally disabled
"-Xlint:-rawtypes", // TODO enable and fix warnings
"-Xlint:-deprecation", // TODO enable and fix warnings
"-Xlint:-unchecked" // TODO enable and fix warnings
]
compileGroovy {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
compileTestJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
//compileTestJava.options.compilerArgs += "-parameters"
}
sourceSets.test.resources.srcDirs = ["src/test/resources", "src/test/java"]
configurations {
jacoco
}
configurations.all {
exclude group: 'commons-logging'
exclude module: 'junit'
}
test {
systemProperty("java.awt.headless", "true")
systemProperty("testGroups", project.properties.get("testGroups"))
scanForTestClasses = false
include '**/*Tests.*'
include '**/*Spec.*'
exclude '**/*Abstract*.*'
}
repositories {
maven { url 'http://repo.spring.io/libs-milestone' }
//mavenLocal()
mavenCentral()
}
// dependencies that are common across all java projects
dependencies {
// Logging
compile "org.slf4j:slf4j-api:$slf4jVersion"
// JSR-305 annotations
optional "com.google.code.findbugs:jsr305:2.0.0"
// Groovy
testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
// Testing
testCompile "org.spockframework:spock-core:$spockVersion",
"org.hamcrest:hamcrest-library:1.3"
testRuntime "ch.qos.logback:logback-classic:$logbackVersion"
// Code coverage
jacoco "org.jacoco:org.jacoco.agent:$jacocoVersion:runtime"
}
}
configure(subprojects - project(":reactor-benchmark")) { subproject ->
jar {
manifest.attributes["Created-By"] = "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
manifest.attributes["Implementation-Title"] = subproject.name
manifest.attributes["Implementation-Version"] = subproject.version
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task groovydocJar(type: Jar) {
classifier = 'groovydoc'
from groovydoc
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
archives groovydocJar
}
test {
testLogging {
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=reactor.*"
events "failed"
exceptionFormat "full"
}
}
}
configure(rootProject) {
description = "Reactor"
configurations.archives.artifacts.clear()
task api(type: Javadoc) {
group = "Documentation"
description = "Generates aggregated Javadoc API documentation."
title = "${rootProject.description} ${version} API"
dependsOn {
subprojects.collect {
it.tasks.getByName("jar")
}
}
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.overview = "src/api/overview.html"
options.stylesheetFile = file("src/api/stylesheet.css")
options.links(project.ext.javadocLinks)
source subprojects.collect { project ->
project.sourceSets.main.allJava
}
maxMemory = "1024m"
destinationDir = new File(buildDir, "api")
doFirst {
classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
}
}
}
project('reactor-core') {
description = 'Core Reactor components'
apply plugin: 'osgi'
ext.bundleImportPackages = [
'net.openhft.chronicle;resolution:=optional',
'net.openhft.chronicle.tools;resolution:=optional',
'com.fasterxml.jackson.core;resolution:=optional',
'com.fasterxml.jackson.databind;resolution:=optional',
'com.fasterxml.jackson.databind.node;resolution:=optional',
'com.fasterxml.jackson.databind.type;resolution:=optional',
'com.jayway.jsonpath;resolution:=optional',
'com.jayway.jsonpath.internal;resolution:=optional',
'com.jayway.jsonpath.spi;resolution:=optional',
'org.slf4j;version="[1.5.4,2)"',
'*'
]
dependencies {
// High-speed Dispatching
compile "com.lmax:disruptor:$disruptorVersion"
// High-speed Messaging
optional "net.openhft:chronicle:$openHftChronicleVersion",
"net.openhft:lang:$openHftLangVersion"
// JSON handling
optional "com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion",
"com.jayway.jsonpath:json-path:$jsonPathVersion"
}
jar {
manifest {
instruction 'Import-Package', bundleImportPackages.join(',')
}
}
}
project('reactor-groovy') {
description = 'Reactor Groovy components'
apply plugin: 'osgi'
sonarRunner {
sonarProperties {
property "sonar.language", "grvy"
}
}
dependencies {
compile project(':reactor-core'),
"org.codehaus.groovy:groovy-all:$groovyVersion"
}
}
project('reactor-spring') {
apply plugin: 'osgi'
description = 'Reactor Spring components'
eclipse {
project {
natures += 'org.springframework.ide.eclipse.core.springnature'
}
}
dependencies {
compile project(':reactor-core')
// Spring
compile "org.springframework:spring-beans:$springVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-context-support:$springVersion",
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-expression:$springVersion",
"org.springframework:spring-tx:$springVersion",
"com.jayway.jsonpath:json-path:$jsonPathVersion"
// Testing
testCompile "org.spockframework:spock-spring:$spockVersion",
"org.springframework:spring-test:$springVersion"
testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion"
}
}
project('reactor-logback') {
description = 'Processor-based Logback async appender implementation'
dependencies {
compile project(':reactor-core')
// Logback
compile "ch.qos.logback:logback-classic:$logbackVersion"
}
}
project('reactor-benchmark') {
description = 'Performance tests'
sonarRunner {
skipProject = true
}
dependencies {
compile project(':reactor-core')
}
}
project('reactor-tcp') {
apply plugin: 'osgi'
description = 'Reactor TCP components'
ext.bundleImportPackages = [
'com.fasterxml.jackson.core;resolution:=optional',
'com.fasterxml.jackson.databind;resolution:=optional',
'com.fasterxml.jackson.module;resolution:=optional',
'*'
]
dependencies {
compile project(':reactor-core')
compile "io.netty:netty-all:$nettyVersion"
optional "com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion"
// Testing
testCompile "org.apache.hadoop:hadoop-client:$hadoopVersion"
testRuntime project(':reactor-logback'),
"org.slf4j:jcl-over-slf4j:$slf4jVersion"
}
jar {
manifest {
instruction 'Import-Package', bundleImportPackages.join(',')
}
}
}
task wrapper(type: Wrapper, description: "Create a Gradle self-download wrapper") {
group = 'Project Setup'
gradleVersion = "$gradleVersion"
}