260 lines
7.4 KiB
Groovy
260 lines
7.4 KiB
Groovy
apply plugin: 'base'
|
|
|
|
description = "Spring Cloud"
|
|
|
|
buildscript {
|
|
repositories {
|
|
maven { url 'https://repo.spring.io/plugins-release' }
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
|
|
classpath 'io.spring.gradle:spring-io-plugin:0.0.4.RELEASE'
|
|
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
|
|
}
|
|
}
|
|
|
|
ext {
|
|
springVersion = "3.1.4.RELEASE"
|
|
tomcatVersion = "7.0.53"
|
|
|
|
springAmqpVersion = "1.1.1.RELEASE"
|
|
|
|
springDataMongoVersion = "1.4.3.RELEASE"
|
|
mongoDriverVersion = "2.11.4"
|
|
|
|
springDataRedisVersion = "1.1.1.RELEASE"
|
|
jedisVersion = "2.1.0"
|
|
lettuceVersion = "3.4.3.Final"
|
|
|
|
commonDbcpVersion = "1.4"
|
|
commonDbcp2Version = "2.0"
|
|
|
|
mysqlDriverVersion = "5.1.29"
|
|
mariadbDriverVersion = "1.1.3"
|
|
postgresDriverVersion = "9.0-801.jdbc4"
|
|
|
|
springDataCassandraVersion = "1.5.3.RELEASE"
|
|
cassandraDriverVersion = "3.1.3"
|
|
|
|
javaxMailVersion = "1.4.7"
|
|
|
|
cglibVersion = "3.1"
|
|
|
|
jacksonVersion = "2.9.9.1"
|
|
|
|
junitVersion = "4.11"
|
|
mockitoVersion = "1.9.5"
|
|
eurekaClientVersion = "1.1.135"
|
|
hadoopCommonVersion = "2.2.0"
|
|
|
|
javadocLinks = [
|
|
'https://docs.oracle.com/javase/7/docs/api/',
|
|
'https://docs.oracle.com/javaee/6/api/',
|
|
'https://docs.spring.io/spring/docs/current/javadoc-api/',
|
|
'https://docs.spring.io/spring-amqp/docs/latest-ga/api/',
|
|
'https://docs.spring.io/spring-data/data-mongo/docs/current/api/',
|
|
'https://docs.spring.io/spring-data/data-redis/docs/current/api/'
|
|
] as String[]
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'eclipse'
|
|
|
|
apply plugin: 'propdeps'
|
|
apply plugin: 'propdeps-maven'
|
|
apply plugin: 'propdeps-idea'
|
|
apply plugin: 'propdeps-eclipse'
|
|
apply plugin: "org.asciidoctor.gradle.asciidoctor"
|
|
|
|
asciidoctor {
|
|
sourceDir = new File("docs/src/main/asciidoc")
|
|
outputDir = new File("docs/target/generated-docs")
|
|
options = [
|
|
'doctype': 'book'
|
|
]
|
|
attributes = [
|
|
'source-highlighter': 'coderay'
|
|
]
|
|
}
|
|
|
|
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|
|
|
|
if (project.hasProperty('platformVersion')) {
|
|
apply plugin: 'spring-io'
|
|
|
|
// necessary to resolve the Spring IO versions (which may include snapshots)
|
|
repositories {
|
|
maven { url "https://repo.spring.io/libs-snapshot" }
|
|
}
|
|
|
|
dependencyManagement {
|
|
springIoTestRuntime {
|
|
imports {
|
|
mavenBom "io.spring.platform:platform-bom:${platformVersion}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceCompatibility = 1.6
|
|
targetCompatibility = 1.6
|
|
|
|
javadoc {
|
|
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
|
options.author = true
|
|
options.header = project.name
|
|
}
|
|
|
|
task packageSources(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = "javadoc"
|
|
from javadoc
|
|
}
|
|
|
|
artifacts {
|
|
archives packageSources
|
|
archives javadocJar
|
|
}
|
|
|
|
dependencies {
|
|
testCompile("junit:junit:$junitVersion")
|
|
testCompile("org.mockito:mockito-core:$mockitoVersion")
|
|
}
|
|
|
|
repositories {
|
|
maven { url "https://repo.spring.io/libs-milestone" }
|
|
}
|
|
}
|
|
|
|
configure(rootProject) {
|
|
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
|
|
|
|
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("cloud") {
|
|
from xsdFile.path
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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.links(project.ext.javadocLinks)
|
|
|
|
source subprojects.collect { project ->
|
|
project.sourceSets.main.allJava
|
|
}
|
|
|
|
classpath = files(subprojects.collect { project ->
|
|
project.sourceSets.main.compileClasspath
|
|
})
|
|
|
|
maxMemory = "1024m"
|
|
destinationDir = new File(buildDir, "api")
|
|
}
|
|
|
|
task docsZip(type: Zip) {
|
|
group = 'Distribution'
|
|
classifier = 'docs'
|
|
description = "Builds -${classifier} archive containing api and reference " +
|
|
"for deployment at docs.spring.io/spring-cloud/docs."
|
|
|
|
from(api) {
|
|
into 'api'
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
archives docsZip
|
|
archives schemaZip
|
|
}
|
|
}
|
|
|
|
ext {
|
|
matrix = [
|
|
"driver211-mongo14": [mongoDriverVersion: "2.11.4", springDataMongoVersion: "1.4.3.RELEASE"],
|
|
"driver211-mongo15": [mongoDriverVersion: "2.11.4", springDataMongoVersion: "1.5.5.RELEASE"],
|
|
"driver211-mongo16": [mongoDriverVersion: "2.11.4", springDataMongoVersion: "1.6.3.RELEASE"],
|
|
"driver213-mongo17": [mongoDriverVersion: "2.13.0", springDataMongoVersion: "1.7.2.RELEASE"],
|
|
"driver214-mongo18": [mongoDriverVersion: "2.13.0", springDataMongoVersion: "1.8.4.RELEASE"],
|
|
"driver214-mongo19": [mongoDriverVersion: "2.14.0", springDataMongoVersion: "1.9.2.RELEASE"],
|
|
"driver32-mongo19" : [mongoDriverVersion: "3.2.2", springDataMongoVersion: "1.9.2.RELEASE"],
|
|
"jedis25-redis14" : [jedisVersion: "2.5.2", springDataRedisVersion: "1.4.4.RELEASE"],
|
|
"jedis26-redis15" : [jedisVersion: "2.6.3", springDataRedisVersion: "1.5.2.RELEASE"],
|
|
"jedis27-redis16" : [jedisVersion: "2.7.3", springDataRedisVersion: "1.6.4.RELEASE"],
|
|
"jedis28-redis17" : [jedisVersion: "2.8.1", springDataRedisVersion: "1.7.2.RELEASE"],
|
|
"driver300-cass15" : [cassandraDriverVersion: "3.0.0", springDataCassandraVersion: "1.5.3.RELEASE"],
|
|
"driver301-cass15" : [cassandraDriverVersion: "3.0.1", springDataCassandraVersion: "1.5.3.RELEASE"],
|
|
"driver313-cass15" : [cassandraDriverVersion: "3.1.3", springDataCassandraVersion: "1.5.3.RELEASE"],
|
|
// "lettuce34-redis15": [lettuceVersion: "3.4.3.Final", springDataRedisVersion: "1.5.2.RELEASE"],
|
|
// "lettuce34-redis16": [lettuceVersion: "3.4.3.Final", springDataRedisVersion: "1.6.4.RELEASE"],
|
|
// "lettuce34-redis17": [lettuceVersion: "3.4.3.Final", springDataRedisVersion: "1.7.2.RELEASE"],
|
|
"amqp11" : [springAmqpVersion: "1.1.4.RELEASE"],
|
|
"amqp12" : [springAmqpVersion: "1.2.2.RELEASE"],
|
|
"amqp13" : [springAmqpVersion: "1.3.9.RELEASE"],
|
|
"amqp14" : [springAmqpVersion: "1.4.6.RELEASE"],
|
|
"amqp15" : [springAmqpVersion: "1.5.6.RELEASE"],
|
|
"amqp16" : [springAmqpVersion: "1.6.0.RELEASE"],
|
|
"spring32" : [springVersion: "3.2.17.RELEASE"],
|
|
"spring40" : [springVersion: "4.0.9.RELEASE"],
|
|
"spring41" : [springVersion: "4.1.9.RELEASE"],
|
|
"spring42" : [springVersion: "4.2.6.RELEASE"],
|
|
"spring43" : [springVersion: "4.3.0.RELEASE"],
|
|
"tomcat7" : [tomcatVersion: "7.0.53"],
|
|
"tomcat8" : [tomcatVersion: "8.0.24"],
|
|
]
|
|
}
|
|
|
|
task matrixTests
|
|
|
|
task defineMatrixTests {
|
|
def createTestTask = { name, props ->
|
|
task "$name"(type: GradleBuild) {
|
|
tasks = ['test']
|
|
startParameter.projectProperties = props
|
|
}
|
|
}
|
|
matrix.each { sp ->
|
|
def testTask = createTestTask(sp.key, sp.value)
|
|
matrixTests.dependsOn(testTask.name)
|
|
}
|
|
}
|
|
|
|
|
|
task dist(dependsOn: assemble) {
|
|
group = 'Distribution'
|
|
description = 'Builds -dist, -docs and -schema distribution archives.'
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion = '2.10'
|
|
}
|