build.gradle 51.0 KB
Newer Older
1
buildscript {
2
	ext.kotlinVersion = '1.1.2-eap-77'
3
	repositories {
4
		maven { url "https://repo.spring.io/plugins-release" }
5
		maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
6 7
	}
	dependencies {
8
		classpath("io.spring.gradle:dependency-management-plugin:1.0.0.RELEASE")
R
Rob Winch 已提交
9
		classpath("io.spring.gradle:propdeps-plugin:0.0.8")
10
		classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
11
		classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
12 13 14
		classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
		classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.14")
		classpath("org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6")
15
	}
16 17
}

18
plugins {
19
	id "org.sonarqube" version "2.2.1"
20 21
}

S
Stephane Nicoll 已提交
22 23 24 25 26 27
ext {
	linkHomepage = 'https://projects.spring.io/spring-framework'
	linkCi = 'https://build.spring.io/browse/SPR'
	linkIssue = 'https://jira.spring.io/browse/SPR'
	linkScmUrl = 'https://github.com/spring-projects/spring-framework'
	linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git'
28
	linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git'
29

30
	moduleProjects = subprojects.findAll {
31 32
		!it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom')
	}
S
Stephane Nicoll 已提交
33 34
}

C
Chris Beams 已提交
35
configure(allprojects) { project ->
36 37
	group = "org.springframework"
	version = qualifyVersionIfNecessary(version)
38

39
	ext.activationApiVersion   = "1.1.1"
40
	ext.annotationApiVersion   = "1.2"
J
Juergen Hoeller 已提交
41
	ext.aspectjVersion         = "1.9.0.BETA-5"
42
	ext.beanvalVersion         = "1.1.0.Final"
43
	ext.cacheApiVersion        = "1.0.0"
44
	ext.caffeineVersion        = "2.4.0"
45
	ext.eclipselinkVersion     = "2.6.4"
46
	ext.ehcacheVersion         = "2.10.4"
47
	ext.ehcachejcacheVersion   = "1.0.1"
48
	ext.ehcache3Version        = "3.3.1"
49
	ext.ejbApiVersion          = "3.2"
J
Juergen Hoeller 已提交
50
	ext.elApiVersion           = "3.0.1-b04"
51
	ext.fileuploadVersion      = "1.3.2"
52
	ext.freemarkerVersion      = "2.3.26-incubating"
53
	ext.groovyVersion          = "2.4.10"
54
	ext.gsonVersion            = "2.8.0"
55
	ext.hamcrestVersion        = "1.3"
56
	ext.hibernate5Version      = "5.2.10.Final"
57
	ext.hibval5Version         = "5.4.1.Final"
58
	ext.hsqldbVersion          = "2.4.0"
59
	ext.httpasyncVersion       = "4.1.3"
60
	ext.httpclientVersion      = "4.5.3"
61
	ext.interceptorApiVersion  = "1.2"
J
Juergen Hoeller 已提交
62
	ext.jackson2Version        = "2.9.0.pr3"
63
	ext.javamailVersion        = "1.6.0-rc1"
64
	ext.jaxbVersion            = "2.2.11"
65
	ext.jaxwsVersion           = "2.2.11"
66
	ext.jcaVersion             = "1.7"
67
	ext.jettyVersion           = "9.4.4.v20170414"
68
	ext.jmsVersion             = "2.0.1"
69
	ext.jodaVersion            = "2.9.9"
70
	ext.jpaVersion             = "2.1.1"
71
	ext.jsfVersion             = "2.2"
72 73 74
	ext.jspVersion             = "2.3.2-b02"
	ext.jtaVersion             = "1.2"
	ext.junitVersion           = "4.12"
75
	ext.junitVintageVersion    = "4.12.0-M4"
S
Sam Brannen 已提交
76 77
	ext.junitJupiterVersion    = '5.0.0-M4'
	ext.junitPlatformVersion   = '1.0.0-M4'
78
	ext.log4jVersion           = '2.8.2'
79
	ext.nettyVersion           = "4.1.9.Final"
80 81
	ext.okhttp3Version         = "3.7.0"
	ext.poiVersion             = "3.16"
82
	ext.protobufVersion        = "3.2.0"
83
	ext.quartzVersion          = "2.2.3"
S
Sebastien Deleuze 已提交
84
	ext.reactorVersion         = "Bismuth-BUILD-SNAPSHOT"
85
	ext.romeVersion            = "1.7.2"
86
	ext.rxjavaVersion          = '1.2.9'
87
	ext.rxjavaAdapterVersion   = '1.2.1'
88
	ext.rxjava2Version         = '2.0.9'
89
	ext.rxnettyVersion         = '0.5.2'
90
	ext.servletVersion         = "3.1.0"
91
	ext.slf4jVersion           = "1.7.25"
92
	ext.snakeyamlVersion       = "1.18"
93
	ext.testngVersion          = "6.11"
J
Juergen Hoeller 已提交
94
	ext.tiles3Version          = "3.0.7"
95
	ext.tomcatVersion          = "8.5.14"
96
	ext.tyrusVersion           = "1.13.1"
97
	ext.undertowVersion        = "1.4.13.Final"
98
	ext.websocketVersion       = "1.1"
99
	ext.woodstoxVersion        = "5.0.3"
100
	ext.xmlunitVersion         = "2.3.0"
101
	ext.xnioVersion            = "3.4.5.Final"
102
	ext.xstreamVersion         = "1.4.9"
103

104
	ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
105

106
	apply plugin: "propdeps"
P
Phillip Webb 已提交
107
	apply plugin: "java"
108
	apply plugin: "test-source-set-dependencies"
109
	apply from: "${gradleScriptDir}/ide.gradle"
110
	apply from: "${gradleScriptDir}/sniffer.gradle"
C
Chris Beams 已提交
111

S
Sebastien Deleuze 已提交
112 113 114
	// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
	if (!JavaVersion.current().java9Compatible) {
		apply plugin: "kotlin"
115 116
		compileKotlin {
			kotlinOptions.jvmTarget = "1.8"
117 118
			kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]

119 120 121
		}
		compileTestKotlin {
			kotlinOptions.jvmTarget = "1.8"
122
			kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]
123
		}
S
Sebastien Deleuze 已提交
124 125
	}

126
	configurations.all {
J
Juergen Hoeller 已提交
127
		// Check for updates every build
128 129
		resolutionStrategy.cacheChangingModulesFor 0, 'seconds'

J
Juergen Hoeller 已提交
130
		// Consistent netty version (e.g. clashes between netty-all vs netty-common)
131 132 133 134 135 136 137
		resolutionStrategy.eachDependency { DependencyResolveDetails details ->
			if (details.requested.group == 'io.netty') {
				details.useVersion nettyVersion
			}
		}
	}

P
Phillip Webb 已提交
138 139 140
	compileJava.options*.compilerArgs = [
		"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
		"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
S
Stephane Nicoll 已提交
141
		"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
P
Phillip Webb 已提交
142
		"-Xlint:try", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
143
		"-Xlint:unchecked", "-Xlint:-options", "-Werror"
144
	]
C
Chris Beams 已提交
145

P
Phillip Webb 已提交
146
	compileTestJava.options*.compilerArgs = [
147
		"-Xlint:serial", "-Xlint:-varargs", "-Xlint:cast", "-Xlint:classfile",
P
Phillip Webb 已提交
148
		"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
S
Stephane Nicoll 已提交
149
		"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
P
Phillip Webb 已提交
150 151 152
		"-Xlint:try", "-Xlint:-fallthrough", "-Xlint:-rawtypes", "-Xlint:-deprecation",
		"-Xlint:-unchecked", "-Xlint:-options"]

153
	compileJava {
154 155
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
156
		options.encoding = 'UTF-8'
157 158 159
	}

	compileTestJava {
J
Juergen Hoeller 已提交
160 161
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
162
		options.encoding = 'UTF-8'
163
		options.compilerArgs += "-parameters"
J
Juergen Hoeller 已提交
164 165
	}

C
Chris Beams 已提交
166 167
	test {
		systemProperty("java.awt.headless", "true")
168
		systemProperty("testGroups", project.properties.get("testGroups"))
169
		scanForTestClasses = false
170
		include(["**/*Tests.class", "**/*Test.class"])
171 172
		// Since we set scanForTestClasses to false, we need to filter out inner
		// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
173
		// run MyTests by itself will fail if MyTests contains any inner classes.
174
		exclude(["**/Abstract*.class", '**/*$*'])
S
Stephane Nicoll 已提交
175
		reports.junitXml.destination = file("$buildDir/test-results")
C
Chris Beams 已提交
176
	}
C
Chris Beams 已提交
177

178
	repositories {
179
		mavenLocal()
B
Brian Clozel 已提交
180
		maven { url "https://repo.spring.io/libs-release" }
181
		maven { url "https://repo.spring.io/libs-snapshot" }
182
		maven { url "https://repo.spring.io/milestone" }
183
		maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
184
	}
C
Chris Beams 已提交
185

186
	dependencies {
187 188 189
		testCompile("junit:junit:${junitVersion}") {
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
190
		testCompile("org.mockito:mockito-core:2.6.1") {
191 192
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
193
		testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
194
		testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
195
	}
C
Chris Beams 已提交
196 197

	ext.javadocLinks = [
198
		"http://docs.oracle.com/javase/8/docs/api/",
199
		"http://docs.oracle.com/javaee/7/api/",
200
		"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ
J
Juergen Hoeller 已提交
201 202
		"http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/",
		"http://glassfish.java.net/nonav/docs/v3/api/",
P
Phillip Webb 已提交
203 204
		"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
		"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
205
		"http://tiles.apache.org/tiles-request/apidocs/",
J
Juergen Hoeller 已提交
206
		"http://tiles.apache.org/framework/apidocs/",
C
Chris Beams 已提交
207
		"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
B
Brian Clozel 已提交
208 209
		"http://ehcache.org/apidocs/${ehcacheVersion}",
		"http://ehcache.org/apidocs/${ehcache3Version}",
210
		"http://quartz-scheduler.org/api/2.2.1/",
211 212 213
		"http://fasterxml.github.io/jackson-core/javadoc/2.8/",
		"http://fasterxml.github.io/jackson-databind/javadoc/2.8/",
		"http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.8/",
214
		"http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/"
C
Chris Beams 已提交
215
	] as String[]
216 217
}

218
configure(subprojects - project(":spring-build-src")) { subproject ->
219
	apply plugin: "merge"
220
	apply from: "${gradleScriptDir}/publish-maven.gradle"
221 222 223 224 225 226 227 228 229 230 231
	apply plugin: "io.spring.dependency-management"

	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}
232

S
Stephane Nicoll 已提交
233 234 235 236
	configurations {
		jacoco
	}
	dependencies {
237
		jacoco("org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime")
S
Stephane Nicoll 已提交
238 239 240
	}

	gradle.taskGraph.whenReady {taskGraph ->
241
		if (taskGraph.hasTask(':sonarqube')) {
S
Stephane Nicoll 已提交
242 243 244 245
			test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
		}
	}

246
	jar {
P
Phillip Webb 已提交
247 248 249 250
		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
251 252 253 254 255

		from("${rootProject.projectDir}/src/dist") {
			include "license.txt"
			include "notice.txt"
			into "META-INF"
P
Phillip Webb 已提交
256
			expand(copyright: new Date().format("yyyy"), version: project.version)
257 258 259 260
		}
	}

	javadoc {
C
Chris Beams 已提交
261 262
		description = "Generates project-level javadoc for use in -javadoc jar"

263 264 265
		options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
		options.author = true
		options.header = project.name
266
		options.use = true
C
Chris Beams 已提交
267
		options.links(project.ext.javadocLinks)
268
		options.addStringOption('Xdoclint:none', '-quiet')
C
Chris Beams 已提交
269

270 271
		// Suppress warnings due to cross-module @see and @link references.
		// Note that global 'api' task does display all warnings.
C
Chris Beams 已提交
272
		logging.captureStandardError LogLevel.INFO
273
		logging.captureStandardOutput LogLevel.INFO  // suppress "## warnings" message
274 275
	}

276
	task sourcesJar(type: Jar, dependsOn: classes) {
277
		duplicatesStrategy = DuplicatesStrategy.EXCLUDE
278
		classifier = 'sources'
279
		from sourceSets.main.allSource
280
		// Don't include or exclude anything explicitly by default. See SPR-12085.
281 282 283
	}

	task javadocJar(type: Jar) {
P
Phillip Webb 已提交
284
		classifier = "javadoc"
285 286 287 288 289 290 291
		from javadoc
	}

	artifacts {
		archives sourcesJar
		archives javadocJar
	}
C
Chris Beams 已提交
292 293
}

294 295
project("spring-build-src") {
	description = "Exposes gradle buildSrc for IDE support"
296

297
	apply plugin: "groovy"
298 299 300

	dependencies {
		compile gradleApi()
R
Rob Winch 已提交
301
		compile localGroovy()
302 303 304 305 306
	}

	configurations.archives.artifacts.clear()
}

P
Phillip Webb 已提交
307 308
project("spring-core") {
	description = "Spring Core"
309

310 311
	// As of Spring 4.0.3, spring-core includes asm 5.x and repackages cglib 3.2, inlining
	// both into the spring-core jar. cglib 3.2 itself depends on asm 5.x and is therefore
312
	// further transformed by the JarJar task to depend on org.springframework.asm; this
313
	// avoids including two different copies of asm unnecessarily.
J
Juergen Hoeller 已提交
314
	def cglibVersion = "3.2.5"
J
Juergen Hoeller 已提交
315
	def objenesisVersion = "2.5.1"
316 317 318 319

	configurations {
		jarjar
		cglib
320
		objenesis
321 322 323 324 325 326 327 328 329 330 331 332 333 334
	}

	task cglibRepackJar(type: Jar) { repackJar ->
		repackJar.baseName = "spring-cglib-repack"
		repackJar.version = cglibVersion

		doLast() {
			project.ant {
				taskdef name: "jarjar", classname: "com.tonicsystems.jarjar.JarJarTask",
					classpath: configurations.jarjar.asPath
				jarjar(destfile: repackJar.archivePath) {
					configurations.cglib.each { originalJar ->
						zipfileset(src: originalJar)
					}
J
Juergen Hoeller 已提交
335
					// Repackage net.sf.cglib => org.springframework.cglib
P
Phillip Webb 已提交
336
					rule(pattern: "net.sf.cglib.**", result: "org.springframework.cglib.@1")
J
Juergen Hoeller 已提交
337
					// As mentioned above, transform cglib"s internal asm dependencies from
338 339
					// org.objectweb.asm => org.springframework.asm. Doing this counts on the
					// the fact that Spring and cglib depend on the same version of asm!
P
Phillip Webb 已提交
340
					rule(pattern: "org.objectweb.asm.**", result: "org.springframework.asm.@1")
341 342 343 344 345
				}
			}
		}
	}

346 347 348 349 350 351 352 353 354 355 356 357
	task objenesisRepackJar(type: Jar) { repackJar ->
		repackJar.baseName = "spring-objenesis-repack"
		repackJar.version = objenesisVersion

		doLast() {
			project.ant {
				taskdef name: "jarjar", classname: "com.tonicsystems.jarjar.JarJarTask",
					classpath: configurations.jarjar.asPath
				jarjar(destfile: repackJar.archivePath) {
					configurations.objenesis.each { originalJar ->
						zipfileset(src: originalJar)
					}
J
Juergen Hoeller 已提交
358
					// Repackage org.objenesis => org.springframework.objenesis
359 360 361 362 363 364
					rule(pattern: "org.objenesis.**", result: "org.springframework.objenesis.@1")
				}
			}
		}
	}

365
	dependencies {
366
		cglib("cglib:cglib:${cglibVersion}@jar")
367
		objenesis("org.objenesis:objenesis:${objenesisVersion}@jar")
368
		jarjar("com.googlecode.jarjar:jarjar:1.3")
369

P
Phillip Webb 已提交
370
		compile(files(cglibRepackJar))
371
		compile(files(objenesisRepackJar))
372 373
		optional("org.apache.logging.log4j:log4j-api:${log4jVersion}")
		optional("org.slf4j:slf4j-api:${slf4jVersion}")
374
		optional("net.sf.jopt-simple:jopt-simple:5.0.3")
375
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
376
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
377
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
378 379
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
380 381 382
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
383
		optional("io.netty:netty-buffer:${nettyVersion}")
384
		testCompile("io.projectreactor.addons:reactor-test")
385
		testCompile("javax.xml.bind:jaxb-api:${jaxbVersion}")
386
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
387
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
388
		testCompile("com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}") {
P
Phillip Webb 已提交
389 390
			exclude group: "stax", module: "stax-api"
		}
391 392 393
	}

	jar {
J
Juergen Hoeller 已提交
394
		// Inline repackaged cglib classes directly into spring-core jar
395 396
		dependsOn cglibRepackJar
		from(zipTree(cglibRepackJar.archivePath)) {
P
Phillip Webb 已提交
397
			include "org/springframework/cglib/**"
398
		}
399 400 401 402 403

		dependsOn objenesisRepackJar
		from(zipTree(objenesisRepackJar.archivePath)) {
			include "org/springframework/objenesis/**"
		}
404
	}
C
Chris Beams 已提交
405 406
}

P
Phillip Webb 已提交
407 408
project("spring-beans") {
	description = "Spring Beans"
409

410
	dependencies {
411 412
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
413
		optional("javax.inject:javax.inject:1")
414
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
415
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
416
		optional("org.yaml:snakeyaml:${snakeyamlVersion}")
417
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
J
Juergen Hoeller 已提交
418
	}
C
Chris Beams 已提交
419 420
}

421 422
project("spring-beans-groovy") {
	description "Groovy Bean Definitions"
423

J
Juergen Hoeller 已提交
424
	merge.into = project(":spring-beans")
425
	apply plugin: "groovy"
J
Juergen Hoeller 已提交
426 427 428

	dependencies {
		compile(project(":spring-core"))
429
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
J
Juergen Hoeller 已提交
430 431
	}

J
Juergen Hoeller 已提交
432
	// This module's Java and Groovy sources need to be compiled together.
433
	compileJava.enabled = false
J
Juergen Hoeller 已提交
434 435 436
	sourceSets {
		main {
			groovy {
437
				srcDir "src/main/java"
J
Juergen Hoeller 已提交
438 439 440
			}
		}
	}
441 442

	compileGroovy {
443 444
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
445
	}
J
Juergen Hoeller 已提交
446 447
}

P
Phillip Webb 已提交
448 449
project("spring-aop") {
	description = "Spring AOP"
450

451
	dependencies {
452
		compile(project(":spring-beans"))
453 454
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
455
		compile(files(project(":spring-core").objenesisRepackJar))
456
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
457
		optional("org.apache.commons:commons-pool2:2.4.2")
458
		optional("com.jamonapi:jamon:2.81")
459
	}
C
Chris Beams 已提交
460 461
}

P
Phillip Webb 已提交
462 463
project("spring-expression") {
	description = "Spring Expression Language (SpEL)"
464

465
	dependencies {
466
		compile(project(":spring-core"))
467
	}
C
Chris Beams 已提交
468 469
}

P
Phillip Webb 已提交
470 471
project("spring-instrument") {
	description = "Spring Instrument"
472

473
	jar {
P
Phillip Webb 已提交
474 475
		manifest.attributes["Premain-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
476 477
		manifest.attributes["Agent-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
478 479 480
		manifest.attributes["Can-Redefine-Classes"] = "true"
		manifest.attributes["Can-Retransform-Classes"] = "true"
		manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
481
	}
C
Chris Beams 已提交
482 483
}

P
Phillip Webb 已提交
484 485
project("spring-context") {
	description = "Spring Context"
486

487
	apply plugin: "groovy"
488

489
	dependencies {
490 491 492 493 494
		compile(project(":spring-aop"))
		compile(project(":spring-beans"))
		compile(project(":spring-expression"))
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
495
		optional(project(":spring-instrument"))
496
		optional("javax.inject:javax.inject:1")
497 498
		optional("javax.annotation:javax.annotation-api:${annotationApiVersion}")
		optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
499
		optional("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
500
		optional("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
501
		optional("javax.enterprise.concurrent:javax.enterprise.concurrent-api:1.0")
502
		optional("javax.money:money-api:1.0.1")
J
Juergen Hoeller 已提交
503 504
		optional("org.eclipse.persistence:javax.persistence:${jpaVersion}")
		optional("javax.validation:validation-api:${beanvalVersion}")
505
		optional("org.hibernate:hibernate-validator:${hibval5Version}")
506 507
		optional("joda-time:joda-time:${jodaVersion}")
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
508
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
509
		optional("org.beanshell:bsh:2.0b5")
510
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
511
		testCompile("org.apache.commons:commons-pool2:2.4.2")
512
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
513
		testCompile("javax.inject:javax.inject-tck:1")
514
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
515 516 517
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
		testRuntime("org.javamoney:moneta:1.1")
518 519 520 521 522 523 524 525 526 527
	}
}

project("spring-oxm") {
	description = "Spring Object/XML Marshalling"
	apply from: "oxm.gradle"

	dependencies {
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
528 529
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
		optional("javax.activation:activation:${activationApiVersion}")
530 531 532
		optional("org.codehaus.castor:castor-xml:1.4.1")  {
			exclude group: 'stax', module: 'stax-api'
			exclude group: "org.springframework", module: "spring-context"
533
			exclude group: "commons-logging", module: "commons-logging"
534 535 536 537 538
		}
		optional("com.thoughtworks.xstream:xstream:${xstreamVersion}") {
			exclude group: 'xpp3', module: 'xpp3_min'
			exclude group: 'xmlpull', module: 'xmlpull'
		}
539
		optional("org.jibx:jibx-run:1.3.1")
540 541
		testCompile(project(":spring-context"))
		testCompile("xpp3:xpp3:1.1.4c")
542
		testCompile("org.codehaus.jettison:jettison:1.3.8") {
543 544
			exclude group: 'stax', module: 'stax-api'
		}
545
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
546 547
        testCompile(files(genCastor.classesDir).builtBy(genCastor))
        testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
548 549 550
		testRuntime("xerces:xercesImpl:2.11.0")  // for Castor
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
551
	}
552 553 554 555 556 557 558 559 560
}

project("spring-messaging") {
	description = "Spring Messaging"

	dependencies {
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
		compile(project(":spring-context"))
561
		optional(project(":spring-oxm"))
562 563
		optional("io.projectreactor:reactor-core")
		optional("io.projectreactor.ipc:reactor-netty")
564
		optional("io.netty:netty-all:${nettyVersion}")
B
Brian Clozel 已提交
565
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
B
Brian Clozel 已提交
566 567
			exclude group: "javax.servlet", module: "javax.servlet-api"
		}
B
Brian Clozel 已提交
568
		optional("org.eclipse.jetty.websocket:websocket-client:${jettyVersion}")
569
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
570
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
571
		testCompile("javax.inject:javax.inject-tck:1")
572
		testCompile("javax.servlet:javax.servlet-api:${servletVersion}")
J
Juergen Hoeller 已提交
573
		testCompile("javax.validation:validation-api:${beanvalVersion}")
574
		testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
575 576 577 578 579
		testCompile("org.apache.activemq:activemq-broker:5.8.0")
		testCompile("org.apache.activemq:activemq-kahadb-store:5.8.0") {
			exclude group: "org.springframework", module: "spring-context"
		}
		testCompile("org.apache.activemq:activemq-stomp:5.8.0")
B
Brian Clozel 已提交
580
		testCompile("org.eclipse.jetty:jetty-webapp:${jettyVersion}") {
B
Brian Clozel 已提交
581
			exclude group: "javax.servlet", module: "javax.servlet-api"
582
		}
583 584
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}")
585
		testCompile("io.netty:netty-all:${nettyVersion}")
586
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
S
Sebastien Deleuze 已提交
587
		testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
588
		testCompile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
589
		testRuntime("javax.activation:activation:${activationApiVersion}")
590 591
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
592
	}
593 594 595 596 597

	if (JavaVersion.current().java9Compatible) {
		// Reactor2TcpClient's use of Netty requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
C
Chris Beams 已提交
598 599
}

P
Phillip Webb 已提交
600 601
project("spring-tx") {
	description = "Spring Transaction"
602

603
	dependencies {
604 605
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
606
		optional(project(":spring-aop"))
607
		optional(project(":spring-context"))  // for JCA, @EnableTransactionManagement
608
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
J
Juergen Hoeller 已提交
609
		optional("javax.resource:javax.resource-api:${jcaVersion}")
610
		optional("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
611
		optional("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
612
		optional("com.ibm.websphere:uow:6.0.2.17")
613
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
614
		testCompile("org.eclipse.persistence:javax.persistence:${jpaVersion}")
615
		testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
616
	}
C
Chris Beams 已提交
617 618
}

P
Phillip Webb 已提交
619 620
project("spring-jms") {
	description = "Spring JMS"
621

622
	dependencies {
623 624 625 626
		compile(project(":spring-core"))
		compile(project(":spring-beans"))
		compile(project(":spring-aop"))
		compile(project(":spring-context"))
627
		compile(project(":spring-messaging"))
628
		compile(project(":spring-tx"))
629
		provided("javax.jms:javax.jms-api:${jmsVersion}")
630
		optional(project(":spring-oxm"))
631
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
J
Juergen Hoeller 已提交
632
		optional("javax.resource:javax.resource-api:${jcaVersion}")
633
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
634
		testRuntime("javax.activation:activation:${activationApiVersion}")
635
	}
C
Chris Beams 已提交
636 637
}

P
Phillip Webb 已提交
638 639
project("spring-jdbc") {
	description = "Spring JDBC"
640

641
	dependencies {
642
		compile(project(":spring-beans"))
643
		compile(project(":spring-core"))
644
		compile(project(":spring-tx"))
645
		optional(project(":spring-context"))  // for JndiDataSourceLookup
646
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
P
Phillip Webb 已提交
647
		optional("org.hsqldb:hsqldb:${hsqldbVersion}")
648
		optional("com.h2database:h2:1.4.194")
649 650
		optional("org.apache.derby:derby:10.13.1.1")
		optional("org.apache.derby:derbyclient:10.13.1.1")
M
Mario Arias 已提交
651
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
652
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
653
	}
C
Chris Beams 已提交
654 655
}

P
Phillip Webb 已提交
656 657
project("spring-context-support") {
	description = "Spring Context Support"
658

659
	dependencies {
660 661 662
		compile(project(":spring-core"))
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
663 664
		optional(project(":spring-jdbc"))  // for Quartz support
		optional(project(":spring-tx"))  // for Quartz support
665
		optional("javax.activation:activation:${activationApiVersion}")
666
		optional("javax.mail:javax.mail-api:${javamailVersion}")
667
		optional("javax.cache:cache-api:${cacheApiVersion}")
B
Ben Manes 已提交
668
		optional("com.github.ben-manes.caffeine:caffeine:${caffeineVersion}")
669
		optional("net.sf.ehcache:ehcache:${ehcacheVersion}")
670
		optional("org.quartz-scheduler:quartz:${quartzVersion}")
671
		optional("org.codehaus.fabric3.api:commonj:1.1.0")
672
		optional("org.freemarker:freemarker:${freemarkerVersion}")
673
		optional("com.lowagie:itext:2.1.7")
674
		testCompile(project(":spring-context"))
675
		testCompile("org.apache.poi:poi:${poiVersion}")
P
Phillip Webb 已提交
676
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
677
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
678
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
679
		testRuntime("org.ehcache:jcache:${ehcachejcacheVersion}")
680
	}
C
Chris Beams 已提交
681 682
}

683 684 685 686 687 688 689 690 691 692 693
project("spring-context-indexer") {
	description = "Spring Context Indexer"

	dependencies {
		testCompile(project(":spring-context"))
		testCompile("javax.inject:javax.inject:1")
		testCompile("javax.annotation:javax.annotation-api:${annotationApiVersion}")
		testCompile("org.eclipse.persistence:javax.persistence:${jpaVersion}")
	}
}

P
Phillip Webb 已提交
694 695
project("spring-web") {
	description = "Spring Web"
S
Sebastien Deleuze 已提交
696

697
	apply plugin: "groovy"
698

699
	dependencies {
700 701
		compile(project(":spring-aop"))  // for JaxWsPortProxyFactoryBean
		compile(project(":spring-beans"))  // for MultipartFilter
702
		compile(project(":spring-context"))
703
		compile(project(":spring-core"))
704
		provided "javax.servlet:javax.servlet-api:${servletVersion}"
705
		optional(project(":spring-oxm"))  // for MarshallingHttpMessageConverter
706
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
707
		optional("javax.el:javax.el-api:${elApiVersion}")
708
		optional("javax.faces:javax.faces-api:${jsfVersion}")
J
Juergen Hoeller 已提交
709
		optional("javax.validation:validation-api:${beanvalVersion}")
710
		optional("javax.activation:activation:${activationApiVersion}")
711
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
712
		optional("com.caucho:hessian:4.0.38")
713
		optional("commons-fileupload:commons-fileupload:${fileuploadVersion}")
714 715 716
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
		optional("io.projectreactor.ipc:reactor-netty")
717
		optional("io.reactivex:rxjava:${rxjavaVersion}")
718
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
719
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
B
Brian Clozel 已提交
720
		optional("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
721
		optional("io.undertow:undertow-core:${undertowVersion}")
722
		optional("org.jboss.xnio:xnio-api:${xnioVersion}")
723 724
		optional("io.netty:netty-buffer:${nettyVersion}")  // temporarily for JsonObjectDecoder
	  	optional("com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}") {  // woodstox before aalto
725 726
			exclude group: "stax", module: "stax-api"
		}
727
		optional("com.fasterxml:aalto-xml:1.0.0")
728 729 730 731 732 733
		optional("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
		optional("org.apache.httpcomponents:httpasyncclient:${httpasyncVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
734
		optional("io.netty:netty-all:${nettyVersion}")
735
		optional("com.squareup.okhttp3:okhttp:${okhttp3Version}")
736
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
737
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
738 739
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
R
Roy Clarkson 已提交
740
		optional("com.google.code.gson:gson:${gsonVersion}")
741
		optional("javax.json.bind:javax.json.bind-api:1.0.0-M2")
742
		optional("com.rometools:rome:${romeVersion}")
B
Brian Clozel 已提交
743
		optional("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
744
			exclude group: "javax.servlet", module: "javax.servlet-api"
745
		}
B
Brian Clozel 已提交
746
		optional("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
747
			exclude group: "javax.servlet", module: "javax.servlet-api"
748
		}
749 750
		optional("com.google.protobuf:protobuf-java:${protobufVersion}")
		optional("com.google.protobuf:protobuf-java-util:${protobufVersion}")
751
		optional("com.googlecode.protobuf-java-format:protobuf-java-format:1.4")
752 753
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
		optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
754
		optional("javax.mail:javax.mail-api:${javamailVersion}")
755
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
756
		testCompile(project(":spring-context-support"))  // for JafMediaTypeFactory
757
		testCompile("io.projectreactor.addons:reactor-test")
758 759 760
		testCompile("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
			exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
		}
761
		testCompile("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jackson2Version}")
J
Juergen Hoeller 已提交
762
		testCompile("com.fasterxml.jackson.datatype:jackson-datatype-joda:${jackson2Version}")
763
		testCompile("com.fasterxml.jackson.module:jackson-module-kotlin:${jackson2Version}")
764 765 766 767
		testCompile("org.apache.tomcat:tomcat-util:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}")
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}")
768 769 770
		testCompile("io.reactivex:rxnetty-http:${rxnettyVersion}") {
			exclude group: 'io.reactivex', module: 'rxjava'
		}
771 772
		testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}")
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
S
Sebastien Deleuze 已提交
773
		testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
774
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
775 776
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
777
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
778
		testRuntime("org.jboss.logging:jboss-logging:3.3.1.Final")
779
	}
780 781 782 783 784

	if (JavaVersion.current().java9Compatible) {
		// Netty4ClientHttpRequestFactory requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
785 786
}

787 788
project("spring-webflux") {
	description = "Spring WebFlux"
789

790 791 792
	dependencies {
		compile(project(":spring-core"))
		compile(project(":spring-web"))
793 794
		compile("org.reactivestreams:reactive-streams")
		compile("io.projectreactor:reactor-core")
795 796
		optional(project(":spring-context-support"))  // for FreeMarker support
		provided "javax.servlet:javax.servlet-api:${servletVersion}"
797
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
798 799
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
		optional("org.freemarker:freemarker:${freemarkerVersion}")
800 801 802
		optional("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
803
		optional('org.webjars:webjars-locator:0.32-1')
804
		optional("io.projectreactor.ipc:reactor-netty")
805 806
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
807 808 809 810 811
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
		optional("org.apache.tomcat:tomcat-websocket:${tomcatVersion}") {
			exclude group: "org.apache.tomcat", module: "tomcat-websocket-api"
			exclude group: "org.apache.tomcat", module: "tomcat-servlet-api"
		}
812 813 814
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
815 816 817
		optional("io.undertow:undertow-websockets-jsr:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
		}
818
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
819
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
820
		testCompile("io.projectreactor.addons:reactor-test")
821
		testCompile("javax.validation:validation-api:${beanvalVersion}")
R
Rossen Stoyanchev 已提交
822
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
823 824 825 826
		testCompile("org.apache.tomcat:tomcat-util:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}")
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}")
S
Sebastien Deleuze 已提交
827
		testCompile "io.reactivex.rxjava2:rxjava:${rxjava2Version}"
828
		testCompile("io.undertow:undertow-core:${undertowVersion}")
829
		testCompile("org.jboss.xnio:xnio-api:${xnioVersion}")
830 831 832
		testCompile("io.reactivex:rxnetty-http:${rxnettyVersion}") {
			exclude group: 'io.reactivex', module: 'rxjava'
		}
833
		testCompile("com.fasterxml:aalto-xml:1.0.0")
834
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
B
Brian Clozel 已提交
835
		testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}")
836 837
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
838 839 840
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
		testRuntime("javax.activation:activation:${activationApiVersion}")
841
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
842
		testRuntime("org.jboss.logging:jboss-logging:3.3.1.Final")
843
		testRuntime("org.webjars:underscorejs:1.8.3")
844
		testRuntime("org.jruby:jruby:9.1.8.0")
845
		testRuntime("org.python:jython-standalone:2.5.3")
846
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
847
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
848
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
849
	}
850 851 852 853 854

	if (JavaVersion.current().java9Compatible) {
		// ReactorClientHttpConnector requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
C
Chris Beams 已提交
855 856
}

P
Phillip Webb 已提交
857 858
project("spring-orm") {
	description = "Spring Object/Relational Mapping"
859

860
	dependencies {
861 862 863 864 865 866 867
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
		compile(project(":spring-jdbc"))
		compile(project(":spring-tx"))
		optional(project(":spring-aop"))
		optional(project(":spring-context"))
		optional(project(":spring-web"))
J
Juergen Hoeller 已提交
868
		optional("org.eclipse.persistence:javax.persistence:${jpaVersion}")
869 870
		optional("org.eclipse.persistence:org.eclipse.persistence.core:${eclipselinkVersion}")
		optional("org.eclipse.persistence:org.eclipse.persistence.jpa:${eclipselinkVersion}") {
871 872
			exclude group: 'org.eclipse.persistence', module: 'javax.persistence'
		}
873
		optional("org.hibernate:hibernate-core:${hibernate5Version}")
874
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
S
Sam Brannen 已提交
875
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
P
Phillip Webb 已提交
876
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
877
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
878
	}
C
Chris Beams 已提交
879 880
}

P
Phillip Webb 已提交
881 882
project("spring-webmvc") {
	description = "Spring Web MVC"
883

884
	dependencies {
885
		compile(project(":spring-aop"))
886 887
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
888
		compile(project(":spring-core"))
889
		compile(files(project(":spring-core").objenesisRepackJar))
890 891
		compile(project(":spring-expression"))
		compile(project(":spring-web"))
892
		provided("javax.servlet:javax.servlet-api:${servletVersion}")
893
		optional(project(":spring-context-support"))  // for FreeMarker support
894
		optional(project(":spring-oxm"))  // for MarshallingView
895
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
896
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
897
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
898 899
		optional("org.apache.poi:poi:${poiVersion}")
		optional("org.apache.poi:poi-ooxml:${poiVersion}")
900
		optional("org.freemarker:freemarker:${freemarkerVersion}")
901
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
902 903
		optional("com.lowagie:itext:2.1.7")
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
904
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
905 906
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
907
		optional("com.rometools:rome:${romeVersion}")
908
		optional("javax.el:javax.el-api:${elApiVersion}")
909 910
		optional("org.apache.tiles:tiles-api:${tiles3Version}")
		optional("org.apache.tiles:tiles-core:${tiles3Version}") {
911 912
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
913
		optional("org.apache.tiles:tiles-servlet:${tiles3Version}") {
914 915
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
916
		optional("org.apache.tiles:tiles-jsp:${tiles3Version}") {
917 918
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
919
		optional("org.apache.tiles:tiles-el:${tiles3Version}") {
920 921
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
922
		optional("org.apache.tiles:tiles-extras:${tiles3Version}") {
923 924 925
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
			exclude group: "org.springframework", module: "spring-web"
		}
926
		optional('org.webjars:webjars-locator:0.32-1')
927
		optional("org.reactivestreams:reactive-streams")
928
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
929
		testCompile("dom4j:dom4j:1.6.1") {
P
Phillip Webb 已提交
930
			exclude group: "xml-apis", module: "xml-apis"
931 932
		}
		testCompile("jaxen:jaxen:1.1.1") {
P
Phillip Webb 已提交
933 934 935
			exclude group: "xml-apis", module: "xml-apis"
			exclude group: "xom", module: "xom"
			exclude group: "xerces", module: "xercesImpl"
936
		}
B
Brian Clozel 已提交
937
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
938
			exclude group: "javax.servlet", module: "javax.servlet"
939
		}
B
Brian Clozel 已提交
940
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
941
			exclude group: "javax.servlet", module: "javax.servlet"
942
		}
J
Juergen Hoeller 已提交
943
		testCompile("javax.validation:validation-api:${beanvalVersion}")
944
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
945 946 947
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
948
		testCompile("commons-fileupload:commons-fileupload:${fileuploadVersion}")
949
		testCompile("commons-io:commons-io:2.5")
950
		testCompile("joda-time:joda-time:${jodaVersion}")
951
		testCompile("org.mozilla:rhino:1.7.7.1")
952 953 954 955
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.reactivex:rxjava:${rxjavaVersion}")
		testCompile("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
		testCompile("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
956
		testRuntime("org.jruby:jruby:9.1.8.0")
957
		testRuntime("org.python:jython-standalone:2.5.3")
958
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
959
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
960
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
961
		testRuntime("org.webjars:underscorejs:1.8.3")
962
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
963 964 965
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
		testRuntime("javax.activation:activation:${activationApiVersion}")
966 967 968
	}
}

969 970 971 972 973 974 975 976 977
project("spring-websocket") {
	description = "Spring WebSocket"

	dependencies {
		compile(project(":spring-core"))
		compile(project(":spring-context"))
		compile(project(":spring-web"))
		optional(project(":spring-messaging"))
		optional(project(":spring-webmvc"))
978 979
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003
		optional("org.apache.tomcat:tomcat-websocket:${tomcatVersion}") {
			exclude group: "org.apache.tomcat", module: "tomcat-websocket-api"
			exclude group: "org.apache.tomcat", module: "tomcat-servlet-api"
		}
		optional("org.glassfish.tyrus:tyrus-spi:${tyrusVersion}")
		optional("org.glassfish.tyrus:tyrus-core:${tyrusVersion}")
		optional("org.glassfish.tyrus:tyrus-server:${tyrusVersion}")
		optional("org.glassfish.tyrus:tyrus-container-servlet:${tyrusVersion}")
		optional("org.eclipse.jetty:jetty-webapp:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
		optional("org.eclipse.jetty.websocket:websocket-client:${jettyVersion}")
		optional("org.eclipse.jetty:jetty-client:${jettyVersion}")
		optional("io.undertow:undertow-core:${undertowVersion}")
		optional("io.undertow:undertow-servlet:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.servlet", module: "jboss-servlet-api_3.1_spec"
			exclude group: "org.jboss.spec.javax.annotation", module: "jboss-annotations-api_1.2_spec"
		}
		optional("io.undertow:undertow-websockets-jsr:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
		}
1004
		optional("org.jboss.xnio:xnio-api:${xnioVersion}")
1005 1006 1007
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}")
1008 1009
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.projectreactor.ipc:reactor-netty")
1010
		testCompile("io.netty:netty-all:${nettyVersion}")
1011
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
1012
		testRuntime("org.jboss.logging:jboss-logging:3.3.1.Final")
1013
	}
1014 1015 1016 1017 1018

	if (JavaVersion.current().java9Compatible) {
		// Reactor2TcpClient's use of Netty requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
1019 1020
}

P
Phillip Webb 已提交
1021 1022
project("spring-test") {
	description = "Spring TestContext Framework"
1023

1024
	dependencies {
1025
		compile(project(":spring-core"))
1026 1027 1028 1029 1030 1031 1032
		optional(project(":spring-beans"))
		optional(project(":spring-context"))
		optional(project(":spring-jdbc"))
		optional(project(":spring-tx"))
		optional(project(":spring-orm"))
		optional(project(":spring-web"))
		optional(project(":spring-webmvc"))
1033
		optional(project(":spring-webflux"))
1034
		optional(project(":spring-websocket"))
1035
		optional("junit:junit:${junitVersion}")
1036
		optional("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
1037
		optional("org.testng:testng:${testngVersion}")
1038
		optional("javax.inject:javax.inject:1")
1039 1040
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
1041 1042 1043 1044
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
		optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
			exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
		}
1045
		optional("javax.el:javax.el-api:${elApiVersion}")
1046
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
1047 1048
		optional("javax.activation:activation:${activationApiVersion}")
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
1049
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
S
Sam Brannen 已提交
1050
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
1051
		optional("org.hamcrest:hamcrest-core:${hamcrestVersion}")
1052
		optional("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
1053 1054 1055 1056 1057
		optional("net.sourceforge.htmlunit:htmlunit:2.26") {
			exclude group: "commons-logging", module: "commons-logging"
		}
		optional("org.seleniumhq.selenium:htmlunit-driver:2.26")
		optional("org.seleniumhq.selenium:selenium-java:3.3.1") {
1058 1059
			exclude group: "io.netty", module: "netty"
		}
1060
		optional("org.skyscreamer:jsonassert:1.4.0")
1061
		optional("com.jayway.jsonpath:json-path:2.2.0")
1062 1063
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
1064
		optional("io.projectreactor.addons:reactor-test")
1065 1066
		testCompile(project(":spring-context-support"))
		testCompile(project(":spring-oxm"))
1067
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1068
		testCompile("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
1069
		testCompile("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
1070
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
1071
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
1072 1073
		// Enable use of the JUnitPlatform Runner
		testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
1074
		testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
1075
		testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
1076
		testCompile("com.rometools:rome:${romeVersion}")
1077 1078
		testCompile("org.apache.tiles:tiles-api:${tiles3Version}")
		testCompile("org.apache.tiles:tiles-core:${tiles3Version}") {
1079 1080
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1081
		testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}") {
1082 1083
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1084
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1085 1086 1087
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
1088
		testCompile("javax.cache:cache-api:${cacheApiVersion}")
1089
		testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
1090
		testCompile('io.projectreactor.ipc:reactor-netty')
1091
		testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
1092 1093
		// Pull in the latest Launcher API and the Vintage engine so
		// that we can run JUnit 4 tests in IntelliJ IDEA.
1094
		testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
1095
		testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
1096
		testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")  // Java Util Logging for JUnit 5
1097
		testRuntime("org.ehcache:ehcache:${ehcache3Version}")
J
Juergen Hoeller 已提交
1098
		testRuntime("org.terracotta:management-model:2.0.0")
1099 1100
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
1101 1102
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
1103
	}
1104 1105

	task testNG(type: Test) {
1106
		description = 'Runs TestNG tests.'
1107
		useTestNG()
1108
		scanForTestClasses = false
1109 1110
		include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
		// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
1111
		// testLogging.showStandardStreams = true
1112
		// forkEvery 1
1113
		reports.junitXml.destination = file("$buildDir/test-results")
1114 1115 1116
	}

	test {
1117
		description = 'Runs JUnit tests.'
1118 1119
		dependsOn testNG
		useJUnit()
1120 1121 1122
		scanForTestClasses = false
		include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
		exclude(['**/testng/**/*.*'])
1123 1124
		// Java Util Logging for JUnit 5.
		// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
1125
		reports.junitXml.destination = file("$buildDir/test-results")
1126
	}
1127 1128

	task aggregateTestReports(type: TestReport) {
1129
		description = 'Aggregates JUnit and TestNG test reports.'
1130 1131 1132 1133 1134
		destinationDir = test.reports.html.destination
		reportOn test, testNG
	}

	check.dependsOn aggregateTestReports
C
Chris Beams 已提交
1135 1136
}

P
Phillip Webb 已提交
1137 1138 1139
project("spring-aspects") {
	description = "Spring Aspects"
	apply from: "aspects.gradle"
1140

1141
	dependencies {
1142
		aspects(project(":spring-orm"))
1143 1144 1145
		ajc("org.aspectj:aspectjtools:${aspectjVersion}")
		rt("org.aspectj:aspectjrt:${aspectjVersion}")
		compile("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
1146
		provided("org.eclipse.persistence:javax.persistence:${jpaVersion}")
1147 1148 1149 1150 1151 1152
		optional(project(":spring-aop"))  // for @Async support
		optional(project(":spring-beans"))  // for @Configurable support
		optional(project(":spring-context"))  // for @Enable* support
		optional(project(":spring-context-support"))  // for JavaMail and JSR-107 support
		optional(project(":spring-orm"))  // for JPA exception translation support
		optional(project(":spring-tx"))  // for JPA, @Transactional support
1153
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")  // for @javax.transaction.Transactional support
1154
		optional("javax.cache:cache-api:${cacheApiVersion}")
1155
		testCompile(project(":spring-core"))  // for CodeStyleAspect
1156
		testCompile(project(":spring-test"))
1157
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1158
	}
1159

1160
	eclipse.project {
P
Phillip Webb 已提交
1161
		natures += "org.eclipse.ajdt.ui.ajnature"
1162
		buildCommands = [new org.gradle.plugins.ide.eclipse.model.BuildCommand("org.eclipse.ajdt.core.ajbuilder")]
1163
	}
C
Chris Beams 已提交
1164 1165
}

1166 1167
project("spring-framework-bom") {
	description = "Spring Framework (Bill of Materials)"
1168

1169 1170 1171 1172 1173
	dependencyManagement {
		generatedPomCustomization {
			enabled = false
		}
	}
1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206

	configurations.archives.artifacts.clear()
	artifacts {
		// work around GRADLE-2406 by attaching text artifact
		archives(file("spring-framework-bom.txt"))
	}

	install {
		repositories.mavenInstaller {
			pom.whenConfigured {
				packaging = "pom"
				withXml {
					asNode().children().last() + {
						delegate.dependencyManagement {
							delegate.dependencies {
								parent.subprojects.sort { "$it.name" }.each { p ->
									if (p.hasProperty("merge") && p.merge.into == null && p != project) {
										delegate.dependency {
											delegate.groupId(p.group)
											delegate.artifactId(p.name)
											delegate.version(p.version)
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

1207 1208
sonarqube {
	properties {
S
Stephane Nicoll 已提交
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220
		property "sonar.projectName", "Spring Framework"
		property "sonar.profile", "Spring Framework"
		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"
	}
}

1221
configure(rootProject) {
P
Phillip Webb 已提交
1222
	description = "Spring Framework"
1223

1224
	apply plugin: "groovy"
R
Rob Winch 已提交
1225
	apply plugin: "io.spring.dependency-management"
1226
	// apply plugin: "detect-split-packages"
1227
	apply from: "${gradleScriptDir}/jdiff.gradle"
1228
	apply from: "${gradleScriptDir}/docs.gradle"
1229

R
Rob Winch 已提交
1230 1231 1232 1233 1234 1235 1236 1237 1238 1239
	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}

1240 1241 1242 1243 1244
	// TODO: DetectSplitPackagesPlugin fails in line 154 due to method not found on java.io.File.
	// TODO: Possibly related to user rights or OS differences; passes on local Windows machine.
	// detectSplitPackages {
	//	projectsToScan -= project(":spring-instrument-tomcat")
	// }
1245

C
Chris Beams 已提交
1246
	// don't publish the default jar for the root project
1247 1248
	configurations.archives.artifacts.clear()

1249
	dependencies {  // for integration tests
1250
		testCompile(project(":spring-aop"))
1251
		testCompile(project(":spring-beans"))
1252
		testCompile(project(":spring-context"))
1253 1254
		testCompile(project(":spring-core"))
		testCompile(project(":spring-expression"))
1255
		testCompile(project(":spring-jdbc"))
1256
		testCompile(project(":spring-orm"))
1257
		testCompile(project(":spring-test"))
1258
		testCompile(project(":spring-tx"))
1259
		testCompile(project(":spring-web"))
1260
		testCompile("javax.servlet:javax.servlet-api:${servletVersion}")
1261
		testCompile("javax.inject:javax.inject:1")
J
Juergen Hoeller 已提交
1262
		testCompile("javax.resource:javax.resource-api:${jcaVersion}")
1263
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
1264
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
P
Phillip Webb 已提交
1265
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1266 1267 1268 1269 1270 1271 1272 1273 1274
	}

	artifacts {
		archives docsZip
		archives schemaZip
		archives distZip
	}

	task wrapper(type: Wrapper) {
P
Phillip Webb 已提交
1275
		description = "Generates gradlew[.bat] scripts"
S
Sam Brannen 已提交
1276
		gradleVersion = '3.5'
1277 1278

		doLast() {
1279
			def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
1280
			def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
P
Phillip Webb 已提交
1281
			File wrapperFile = file("gradlew")
1282 1283
			wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
				"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
P
Phillip Webb 已提交
1284
			File wrapperBatFile = file("gradlew.bat")
1285 1286 1287 1288
			wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
				"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
		}
	}
1289

1290
}
1291

S
Stephane Nicoll 已提交
1292
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
1293
	sonarqube {
S
Stephane Nicoll 已提交
1294 1295 1296 1297 1298
		skipProject = true
	}
}

configure(project(':spring-core')) {
1299 1300
	sonarqube {
		properties {
S
Stephane Nicoll 已提交
1301 1302 1303 1304 1305 1306
			property "sonar.exclusions",
					"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
		}
	}
}

1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317
/*
 * Support publication of artifacts versioned by topic branch.
 * CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.
 * If <TOPIC> starts with 'SPR-', change version
 *     from BUILD-SNAPSHOT => <TOPIC>-SNAPSHOT
 *     e.g. 3.2.1.BUILD-SNAPSHOT => 3.2.1.SPR-1234-SNAPSHOT
 */
def qualifyVersionIfNecessary(version) {
	if (rootProject.hasProperty("BRANCH_NAME")) {
		def qualifier = rootProject.getProperty("BRANCH_NAME")
		if (qualifier.startsWith("SPR-")) {
1318
			return version.replace('BUILD', qualifier)
1319 1320
		}
	}
1321
	return version
1322
}