1
- description = ' Spring Integration SMB Support'
2
-
3
1
buildscript {
4
2
repositories {
5
- maven { url ' https://repo.springsource.org /plugins-snapshot ' }
3
+ maven { url ' https://repo.spring.io /plugins-release ' }
6
4
}
7
5
dependencies {
8
- classpath ' org.springframework.build.gradle:docbook-reference-plugin:0.1.5'
6
+ classpath ' io.spring.gradle:dependency-management-plugin:1.0.0.RC2'
7
+ classpath ' io.spring.gradle:spring-io-plugin:0.0.6.RELEASE'
8
+ classpath ' io.spring.gradle:docbook-reference-plugin:0.3.1'
9
9
}
10
10
}
11
11
12
- apply plugin : ' java'
12
+ plugins {
13
+ id ' java'
14
+ id ' eclipse'
15
+ id ' idea'
16
+ id ' jacoco'
17
+ id ' checkstyle'
18
+ id ' org.sonarqube' version ' 2.1'
19
+ }
20
+
21
+ description = ' Spring Integration SMB Support'
22
+
13
23
apply from : " ${ rootProject.projectDir} /publish-maven.gradle"
14
- apply plugin : ' eclipse'
15
- apply plugin : ' idea'
16
24
17
25
group = ' org.springframework.integration'
18
26
19
27
repositories {
20
- maven { url ' http://repo.springsource.org/libs-milestone' }
21
- maven { url ' http://repo.springsource.org/plugins-release' } // for bundlor
28
+ if (version. endsWith(' BUILD-SNAPSHOT' ) || project. hasProperty(' platformVersion' )) {
29
+ maven { url ' http://repo.spring.io/libs-snapshot' }
30
+ }
31
+ maven { url ' http://repo.spring.io/libs-milestone' }
32
+ }
33
+
34
+ if (project. hasProperty(' platformVersion' )) {
35
+ apply plugin : ' spring-io'
36
+
37
+ dependencyManagement {
38
+ springIoTestRuntime {
39
+ imports {
40
+ mavenBom " io.spring.platform:platform-bom:${ platformVersion} "
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ compileJava {
47
+ sourceCompatibility = 1.7
48
+ targetCompatibility = 1.7
22
49
}
23
50
24
- // ensure JDK 5 compatibility (GRADLE-18; INT-1578)
25
- sourceCompatibility= 1.6
26
- targetCompatibility= 1.6
51
+ compileTestJava {
52
+ sourceCompatibility = 1.8
53
+ targetCompatibility = 1.8
54
+ }
27
55
28
56
ext {
29
- aspectjVersion = ' 1.6.8'
30
- cglibVersion = ' 2.2'
31
- commonsNetVersion = ' 3.0.1'
32
- groovyVersion = ' 1.8.5'
33
- jacksonVersion = ' 1.9.2'
34
- javaxActivationVersion = ' 1.1.1'
35
- junitVersion = ' 4.11'
36
- log4jVersion = ' 1.2.12'
37
- mockitoVersion = ' 1.9.0'
38
-
39
- springVersion = ' 3.1.3.RELEASE'
40
- springIntegrationVersion = ' 2.2.1.RELEASE'
57
+ jcifsVersion = ' 1.3.18.2'
58
+ log4jVersion = ' 1.2.17'
59
+ springIntegrationVersion = ' 4.3.6.RELEASE'
41
60
42
61
idPrefix = ' smb'
43
62
50
69
51
70
}
52
71
53
- dependencies {
54
-
55
- compile " org.springframework.integration:spring-integration-core:$springIntegrationVersion "
56
- compile " org.springframework.integration:spring-integration-file:$springIntegrationVersion "
57
- compile " org.springframework.integration:spring-integration-stream:$springIntegrationVersion "
58
- compile " jcifs:jcifs:1.3.17"
59
- compile " org.springframework:spring-context-support:$springVersion "
60
- compile(" javax.activation:activation:$javaxActivationVersion " , optional)
61
- testCompile " org.springframework.integration:spring-integration-test:$springIntegrationVersion "
62
-
63
- }
64
-
65
-
66
- eclipse {
67
- project {
68
- natures + = ' org.springframework.ide.eclipse.core.springnature'
69
- }
70
- }
72
+ eclipse. project. natures + = ' org.springframework.ide.eclipse.core.springnature'
71
73
72
74
sourceSets {
73
75
test {
@@ -77,31 +79,43 @@ sourceSets {
77
79
}
78
80
}
79
81
80
- // See http://www.gradle.org/docs/current/userguide/dependency_management.html#sub:configurations
81
- // and http://www.gradle.org/docs/current/dsl/org.gradle.api.artifacts.ConfigurationContainer.html
82
- configurations {
83
- jacoco // Configuration Group used by Sonar to provide Code Coverage using JaCoCo
82
+ jacoco {
83
+ toolVersion = " 0.7.8"
84
+ }
85
+
86
+ checkstyle {
87
+ configFile = file(" $rootDir /src/checkstyle/checkstyle.xml" )
88
+ toolVersion = " 6.16.1"
84
89
}
85
90
86
- // dependencies that are common across all java projects
87
91
dependencies {
88
- testCompile " cglib:cglib-nodep:$cglibVersion "
89
- testCompile " junit:junit-dep:$junitVersion "
90
- testCompile " log4j:log4j:$log4jVersion "
91
- testCompile " org.hamcrest:hamcrest-all:1.1"
92
- testCompile " org.mockito:mockito-all:$mockitoVersion "
93
- testCompile " org.springframework:spring-test:$springVersion "
94
- jacoco group : " org.jacoco" , name : " org.jacoco.agent" , version : " 0.5.6.201201232323" , classifier : " runtime"
92
+ compile " org.codelibs:jcifs:$jcifsVersion "
93
+ compile " org.springframework.integration:spring-integration-file:$springIntegrationVersion "
94
+ compile " org.springframework.integration:spring-integration-stream:$springIntegrationVersion "
95
+
96
+ testCompile " org.springframework.integration:spring-integration-test:$springIntegrationVersion "
97
+ testRuntime " log4j:log4j:$log4jVersion "
95
98
}
96
99
97
100
// enable all compiler warnings; individual projects may customize further
98
- ext. xLintArg = ' -Xlint:all'
99
- [compileJava, compileTestJava]* . options* . compilerArgs = [xLintArg]
101
+ [compileJava, compileTestJava]* . options* . compilerArgs = [' -Xlint:all,-options,-processing' ]
102
+
103
+ jacocoTestReport {
104
+ reports {
105
+ xml. enabled false
106
+ csv. enabled false
107
+ html. destination " ${ buildDir} /reports/jacoco/html"
108
+ }
109
+ }
100
110
101
111
test {
102
112
// suppress all console output during testing unless running `gradle -i`
103
113
logging. captureStandardOutput(LogLevel . INFO )
104
- jvmArgs " -javaagent:${ configurations.jacoco.asPath} =destfile=${ buildDir} /jacoco.exec,includes=*"
114
+ maxHeapSize = " 1024m"
115
+ jacoco {
116
+ append = false
117
+ destinationFile = file(" $buildDir /jacoco.exec" )
118
+ }
105
119
}
106
120
107
121
task sourcesJar (type : Jar ) {
@@ -125,10 +139,8 @@ reference {
125
139
sourceDir = file(' src/reference/docbook' )
126
140
}
127
141
128
- apply plugin : ' sonar-runner'
129
-
130
- sonarRunner {
131
- sonarProperties {
142
+ sonarqube {
143
+ properties {
132
144
property " sonar.jacoco.reportPath" , " ${ buildDir.name} /jacoco.exec"
133
145
property " sonar.links.homepage" , linkHomepage
134
146
property " sonar.links.ci" , linkCi
@@ -150,7 +162,7 @@ task api(type: Javadoc) {
150
162
151
163
source = sourceSets. main. allJava
152
164
classpath = project. sourceSets. main. compileClasspath
153
- destinationDir = new File (buildDir, " api" )
165
+ destinationDir = file( " $b uildDir / api" )
154
166
}
155
167
156
168
task schemaZip (type : Zip ) {
@@ -163,15 +175,15 @@ task schemaZip(type: Zip) {
163
175
def shortName = idPrefix. replaceFirst(" ${ idPrefix} -" , ' ' )
164
176
165
177
project. sourceSets. main. resources. find {
166
- it. path. endsWith(' META-INF/ spring.schemas' )
178
+ it. path. endsWith(" META-INF${ File.separator } spring.schemas" )
167
179
}?. withInputStream { schemas. load(it) }
168
180
169
181
for (def key : schemas. keySet()) {
170
182
File xsdFile = project. sourceSets. main. resources. find {
171
- it. path. endsWith(schemas. get(key))
183
+ it. path. replaceAll( ' \\\\ ' , ' / ' ) . endsWith(schemas. get(key))
172
184
}
173
185
assert xsdFile != null
174
- into (" integration/${ shortName} " ) {
186
+ into(" integration/${ shortName} " ) {
175
187
from xsdFile. path
176
188
}
177
189
}
@@ -266,8 +278,3 @@ task dist(dependsOn: assemble) {
266
278
group = ' Distribution'
267
279
description = ' Builds -dist, -docs and -schema distribution archives.'
268
280
}
269
-
270
- task wrapper (type : Wrapper ) {
271
- description = ' Generates gradlew[.bat] scripts'
272
- gradleVersion = ' 1.6'
273
- }
0 commit comments