forked from spring-projects/spring-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
740 lines (638 loc) · 23 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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
description = 'Spring Integration'
apply plugin: 'base'
apply plugin: 'idea'
buildscript {
repositories {
maven { url 'http://repo.spring.io/plugins-release' }
}
dependencies {
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.8'
}
}
ext {
linkHomepage = 'https://projects.spring.io/spring-integration'
linkCi = 'https://build.springsource.org/browse/INT'
linkIssue = 'https://jira.springsource.org/browse/INT'
linkScmUrl = 'https://github.com/spring-projects/spring-integration'
linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-integration.git'
linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-integration.git'
}
allprojects {
group = 'org.springframework.integration'
repositories {
maven { url 'http://repo.spring.io/libs-snapshot' }
maven { url 'http://repo.spring.io/plugins-release' }
mavenCentral()
}
}
subprojects { subproject ->
apply plugin: 'java'
apply from: "${rootProject.projectDir}/publish-maven.gradle"
apply plugin: 'eclipse'
apply plugin: 'idea'
sourceCompatibility=1.6
targetCompatibility=1.6
ext {
aspectjVersion = '1.6.8'
commonsNetVersion = '3.0.1'
commonsIoVersion = '2.4'
derbyVersion = '10.10.1.1'
groovyVersion = '2.1.0'
hamcrestVersion = '1.3'
jacksonVersion = '1.9.2'
jackson2Version = '2.2.3'
javaxActivationVersion = '1.1.1'
junitVersion = '4.11'
log4jVersion = '1.2.12'
mockitoVersion = '1.9.5'
ftpServerVersion = '1.0.6'
hsqldbVersion = '1.8.0.10'
h2Version = '1.3.172'
activeMqVersion = '5.8.0'
springVersionDefault = '4.0.0.RELEASE'
springVersion = project.hasProperty('springVersion') ? getProperty('springVersion') : springVersionDefault
springAmqpVersion = '1.2.0.RELEASE'
springDataMongoVersion = '1.1.1.RELEASE'
springDataRedisVersion = '1.1.0.RELEASE'
lettuceVersion = '2.3.3'
springGemfireVersion = '1.3.1.RELEASE'
springSecurityVersion = '3.1.3.RELEASE'
springSocialTwitterVersion = '1.0.5.RELEASE'
springWsVersion = '2.1.1.RELEASE'
springRetryVersion = '1.0.3.RELEASE'
}
eclipse {
project {
natures += 'org.springframework.ide.eclipse.core.springnature'
}
}
sourceSets {
test {
resources {
srcDirs = ['src/test/resources', 'src/test/java']
}
}
}
// See http://www.gradle.org/docs/current/userguide/dependency_management.html#sub:configurations
// and http://www.gradle.org/docs/current/dsl/org.gradle.api.artifacts.ConfigurationContainer.html
configurations {
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
}
// dependencies that are common across all java projects
dependencies {
testCompile "junit:junit:$junitVersion"
testCompile "log4j:log4j:$log4jVersion"
testCompile "org.hamcrest:hamcrest-all:$hamcrestVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
if (!(subproject.name ==~ /.*-(core|test)/)) {
testCompile project(":spring-integration-test")
}
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.5.6.201201232323", classifier: "runtime"
}
// enable all compiler warnings; individual projects may customize further
ext.xLintArg = '-Xlint:all,-options'
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg]
test {
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.integration.*"
}
task testAll() {
doFirst {
tasks.test.systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true'
}
finalizedBy test
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task checkTestConfigs {
doLast {
def configFiles = []
sourceSets.test.java.srcDirs.each {
fileTree(it).include('**/*.xml').exclude('**/log4j.xml').each { configFile ->
def configXml = new XmlParser(false, false).parse(configFile)
if (configXml.@'xsi:schemaLocation' ==~ /.*spring-[a-z-]*\d\.\d\.xsd.*/) {
configFiles << configFile
}
}
}
if (configFiles) {
throw new InvalidUserDataException('Hardcoded XSD version in the config files:\n' +
configFiles.collect {relativePath(it)}.join('\n') +
'\nPlease, use versionless schemaLocations for Spring XSDs to avoid issues with builds on different versions of dependencies.')
}
}
}
test.dependsOn checkTestConfigs
artifacts {
archives sourcesJar
archives javadocJar
}
}
project('spring-integration-amqp') {
description = 'Spring Integration AMQP Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-tx:$springVersion"
compile("org.springframework.amqp:spring-rabbit:$springAmqpVersion") {
exclude group: 'org.springframework'
}
testCompile project(":spring-integration-stream")
testCompile project(":spring-integration-http") // need to test INT-2713
}
// suppress deprecation warnings (@SuppressWarnings("deprecation") is not enough for javac)
compileJava.options.compilerArgs = ["${xLintArg},-deprecation"]
}
project('spring-integration-core') {
description = 'Spring Integration Core'
dependencies {
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-messaging:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile "org.springframework.retry:spring-retry:$springRetryVersion"
compile("org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion", optional)
compile("com.fasterxml.jackson.core:jackson-databind:$jackson2Version", optional)
compile('com.jayway.jsonpath:json-path:0.9.0', optional)
testCompile ("org.aspectj:aspectjweaver:$aspectjVersion")
}
}
project('spring-integration-event') {
description = 'Spring Integration ApplicationEvent Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
}
}
project('spring-integration-feed') {
description = 'Spring Integration RSS Feed Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile("net.java.dev.rome:rome-fetcher:1.0.0") {
exclude group: 'junit'
}
compile "net.java.dev.rome:rome:1.0.0"
}
}
project('spring-integration-file') {
description = 'Spring Integration File Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile "commons-io:commons-io:$commonsIoVersion"
}
}
project('spring-integration-ftp') {
description = 'Spring Integration FTP Support'
dependencies {
compile project(":spring-integration-file")
compile "commons-net:commons-net:$commonsNetVersion"
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.activation:activation:$javaxActivationVersion", optional)
testCompile "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
}
}
project('spring-integration-gemfire') {
description = 'Spring Integration GemFire Support'
test {
forkEvery = 1
systemProperties['gemfire.disableShutdownHook'] = 'true'
}
dependencies {
compile project(":spring-integration-core")
compile ("org.springframework.data:spring-data-gemfire:$springGemfireVersion") {
exclude group: 'org.springframework'
}
compile "org.springframework:spring-tx:$springVersion"
testCompile project(":spring-integration-stream")
}
}
project('spring-integration-groovy') {
description = 'Spring Integration Groovy Support'
dependencies {
compile project(":spring-integration-core")
compile project(":spring-integration-scripting")
compile "org.codehaus.groovy:groovy-all:$groovyVersion"
compile "org.springframework:spring-context-support:$springVersion"
testCompile "org.springframework:spring-web:$springVersion"
}
}
project('spring-integration-http') {
description = 'Spring Integration HTTP Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-webmvc:$springVersion"
compile("javax.servlet:javax.servlet-api:3.0.1", provided)
compile("commons-httpclient:commons-httpclient:3.1") { dep ->
optional dep
exclude group: 'junit', module: 'junit'
}
compile("net.java.dev.rome:rome-fetcher:1.0.0") { dep ->
optional dep
exclude group: 'junit', module: 'junit'
}
compile ("net.java.dev.rome:rome:1.0.0", optional)
}
// suppress deprecation warnings (@SuppressWarnings("deprecation") is not enough for javac)
compileJava.options.compilerArgs = ["${xLintArg},-deprecation"]
}
project('spring-integration-ip') {
description = 'Spring Integration IP Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
runtime project(":spring-integration-stream")
}
// suppress deprecation warnings (@SuppressWarnings("deprecation") is not enough for javac)
compileJava.options.compilerArgs = ["${xLintArg},-deprecation"]
}
project('spring-integration-jdbc') {
description = 'Spring Integration JDBC Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-jdbc:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile "com.google.guava:guava:12.0"
testCompile "com.h2database:h2:$h2Version"
testCompile "hsqldb:hsqldb:$hsqldbVersion"
testCompile "org.apache.derby:derby:$derbyVersion"
testCompile "org.apache.derby:derbyclient:$derbyVersion"
testCompile "org.powermock:powermock-module-junit4:1.5"
testCompile "org.powermock:powermock-api-mockito:1.5"
testCompile "postgresql:postgresql:9.1-901-1.jdbc4"
testCompile "mysql:mysql-connector-java:5.1.24"
testCompile "commons-dbcp:commons-dbcp:1.4"
//testCompile "com.oracle:ojdbc6:11.2.0.3"
}
// suppress derby localization jar path warnings during test compilation
compileTestJava.options.compilerArgs = ["${xLintArg},-path"]
}
project('spring-integration-jms') {
description = 'Spring Integration JMS Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-jms:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile ("org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1", provided)
testCompile("org.apache.activemq:activemq-broker:$activeMqVersion")
testCompile("org.apache.activemq:activemq-kahadb-store:$activeMqVersion") {
exclude group: "org.springframework"
}
testCompile "org.springframework:spring-oxm:$springVersion"
}
}
project('spring-integration-jmx') {
description = 'Spring Integration JMX Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
testCompile "org.aspectj:aspectjweaver:$aspectjVersion"
}
}
project('spring-integration-jpa') {
description = 'Spring Integration JPA Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-orm:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile "org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final"
testCompile "com.h2database:h2:$h2Version"
testCompile "hsqldb:hsqldb:$hsqldbVersion"
testCompile "org.apache.derby:derby:$derbyVersion"
testCompile "org.hibernate:hibernate-entitymanager:3.6.10.Final"
testCompile ("org.apache.openjpa:openjpa:2.2.0") {
exclude group: 'org.apache.geronimo.specs'
}
testRuntime "org.eclipse.persistence:org.eclipse.persistence.jpa:2.3.2"
testRuntime "org.springframework:spring-instrument:$springVersion"
}
//Suppress openjpa annotation processor warnings
compileTestJava.options.compilerArgs = ["${xLintArg},-processing"]
test.doFirst {
def javaAgents = configurations.testRuntime.resolvedConfiguration.resolvedArtifacts
.findAll { it.name in ['spring-instrument', 'openjpa'] }
.collect { "-javaagent:${it.file}" }
jvmArgs javaAgents
}
}
project('spring-integration-mail') {
description = 'Spring Integration Mail Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.mail:mail:1.4.7", provided)
compile("javax.activation:activation:$javaxActivationVersion", optional)
}
// suppress javax.activation path warnings
[compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"]
}
project('spring-integration-mongodb') {
description = 'Spring Integration MongoDB Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-tx:$springVersion"
compile("org.springframework.data:spring-data-mongodb:$springDataMongoVersion") {
exclude group: 'org.springframework'
}
}
}
project('spring-integration-redis') {
description = 'Spring Integration Redis Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-tx:$springVersion"
compile ("org.springframework.data:spring-data-redis:$springDataRedisVersion") {
exclude group: 'org.springframework'
}
testCompile "com.lambdaworks:lettuce:$lettuceVersion"
}
}
project('spring-integration-rmi') {
description = 'Spring Integration RMI Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-context:$springVersion"
}
// suppress deprecation warnings (@SuppressWarnings("deprecation") is not enough for javac)
compileJava.options.compilerArgs = ["${xLintArg},-deprecation"]
}
project('spring-integration-scripting') {
description = 'Spring Integration Scripting Support'
dependencies {
compile project(":spring-integration-core")
testCompile("org.jruby:jruby:1.6.3")
testCompile("org.codehaus.groovy:groovy-all:$groovyVersion")
testCompile("org.python:jython-standalone:2.5.2")
}
}
project('spring-integration-security') {
description = 'Spring Integration Security Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile("org.springframework.security:spring-security-core:$springSecurityVersion") {
exclude group: 'org.springframework', module: 'spring-support'
}
compile("org.springframework.security:spring-security-config:$springSecurityVersion") {
exclude group: 'org.springframework', module: 'spring-support'
}
}
}
project('spring-integration-sftp') {
description = 'Spring Integration SFTP Support'
dependencies {
compile project(":spring-integration-core")
compile project(":spring-integration-file")
compile project(":spring-integration-stream")
compile "com.jcraft:jsch:0.1.49"
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.activation:activation:$javaxActivationVersion", optional)
}
}
project('spring-integration-stream') {
description = 'Spring Integration Stream Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
}
}
project('spring-integration-syslog') {
description = 'Spring Integration Syslog Support'
dependencies {
compile project(":spring-integration-ip")
}
}
project('spring-integration-test') {
description = 'Spring Integration Test Support'
dependencies {
compile project(":spring-integration-core")
compile "junit:junit:$junitVersion"
compile "org.hamcrest:hamcrest-all:$hamcrestVersion"
compile "org.mockito:mockito-core:$mockitoVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-test:$springVersion"
}
}
project('spring-integration-twitter') {
description = 'Spring Integration Twitter Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-web:$springVersion"
compile("org.springframework.social:spring-social-twitter:$springSocialTwitterVersion") {
exclude group: 'org.springframework'
}
compile("javax.activation:activation:$javaxActivationVersion", optional)
testCompile project(":spring-integration-redis")
testCompile project(":spring-integration-redis").sourceSets.test.output
testCompile "com.lambdaworks:lettuce:$lettuceVersion"
}
}
project('spring-integration-ws') {
description = 'Spring Integration Web Services Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-expression:$springVersion"
compile "org.springframework:spring-oxm:$springVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile ("org.springframework.ws:spring-ws-core:$springWsVersion") {
exclude group: 'org.springframework'
}
compile("javax.xml.soap:saaj-api:1.3") { dep ->
optional dep
exclude group: 'javax.activation', module: 'activation'
}
compile("com.sun.xml.messaging.saaj:saaj-impl:1.3", optional)
compile("javax.activation:activation:$javaxActivationVersion", optional)
testCompile "stax:stax-api:1.0.1"
testCompile 'com.thoughtworks.xstream:xstream:1.4.4'
testCompile ("org.springframework.ws:spring-ws-support:$springWsVersion") {
exclude group: 'org.springframework'
}
testCompile ("org.springframework:spring-jms:$springVersion") {
exclude group: 'org.springframework'
}
testCompile "org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1"
testCompile "org.igniterealtime.smack:smack:3.2.1"
testCompile "org.igniterealtime.smack:smackx:3.2.1"
testCompile "javax.mail:mail:1.4.5"
}
// suppress saaj path warnings
[compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"]
}
project('spring-integration-xml') {
description = 'Spring Integration XML Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-oxm:$springVersion"
compile ("org.springframework.ws:spring-xml:$springWsVersion") {
exclude group: 'org.springframework'
}
compile("javax.activation:activation:$javaxActivationVersion", optional)
testCompile "xmlunit:xmlunit:1.3"
}
}
project('spring-integration-xmpp') {
description = 'Spring Integration XMPP Support'
dependencies {
compile project(":spring-integration-core")
compile("javax.activation:activation:$javaxActivationVersion", optional)
compile "org.igniterealtime.smack:smack:3.2.1"
compile "org.igniterealtime.smack:smackx:3.2.1"
compile "org.springframework:spring-context-support:$springVersion"
testCompile project(":spring-integration-stream")
}
// suppress smack path warnings
[compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"]
}
apply plugin: 'docbook-reference'
reference {
sourceDir = file('src/reference/docbook')
}
apply plugin: 'sonar-runner'
sonarRunner {
sonarProperties {
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
property "sonar.links.homepage", linkHomepage
property "sonar.links.ci", linkCi
property "sonar.links.issue", linkIssue
property "sonar.links.scm", linkScmUrl
property "sonar.links.scm_dev", linkScmDevConnection
property "sonar.java.coveragePlugin", "jacoco"
}
}
task api(type: Javadoc) {
group = 'Documentation'
description = 'Generates aggregated Javadoc API documentation.'
title = "${rootProject.description} ${version} API"
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")
source subprojects.collect { project ->
project.sourceSets.main.allJava
}
destinationDir = new File(buildDir, "api")
classpath = files(subprojects.collect { project ->
project.sourceSets.main.compileClasspath
})
}
task schemaZip(type: Zip) {
group = 'Distribution'
classifier = 'schema'
description = "Builds -${classifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."
subprojects.each { subproject ->
def Properties schemas = new Properties();
def shortName = subproject.name.replaceFirst("${rootProject.name}-", '')
if (subproject.name.endsWith("-core")) {
shortName = ''
}
subproject.sourceSets.main.resources.find {
it.path.endsWith('META-INF/spring.schemas')
}?.withInputStream { schemas.load(it) }
for (def key : schemas.keySet()) {
File xsdFile = subproject.sourceSets.main.resources.find {
it.path.endsWith(schemas.get(key))
}
assert xsdFile != null
into ("integration/${shortName}") {
from xsdFile.path
}
}
}
}
task docsZip(type: Zip) {
group = 'Distribution'
classifier = 'docs'
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at static.springframework.org/spring-integration/docs."
from('src/dist') {
include 'changelog.txt'
}
from (api) {
into 'api'
}
from (reference) {
into 'reference'
}
}
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
group = 'Distribution'
classifier = 'dist'
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
ext.baseDir = "${project.name}-${project.version}";
from('src/dist') {
include 'readme.txt'
include 'license.txt'
include 'notice.txt'
into "${baseDir}"
}
from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}
from(zipTree(schemaZip.archivePath)) {
into "${baseDir}/schema"
}
subprojects.each { subproject ->
into ("${baseDir}/libs") {
from subproject.jar
from subproject.sourcesJar
from subproject.javadocJar
}
}
}
// Create an optional "with dependencies" distribution.
// Not published by default; only for use when building from source.
task depsZip(type: Zip, dependsOn: distZip) { zipTask ->
group = 'Distribution'
classifier = 'dist-with-deps'
description = "Builds -${classifier} archive, containing everything " +
"in the -${distZip.classifier} archive plus all dependencies."
from zipTree(distZip.archivePath)
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(":${zipTask.name}")) {
def projectNames = rootProject.subprojects*.name
def artifacts = new HashSet()
subprojects.each { subproject ->
subproject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
def dependency = artifact.moduleVersion.id
if (!projectNames.contains(dependency.name)) {
artifacts << artifact.file
}
}
}
zipTask.from(artifacts) {
into "${distZip.baseDir}/deps"
}
}
}
}
artifacts {
archives distZip
archives docsZip
archives schemaZip
}
task dist(dependsOn: assemble) {
group = 'Distribution'
description = 'Builds -dist, -docs and -schema distribution archives.'
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.10'
distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
}