235 lines
6.9 KiB
Groovy
235 lines
6.9 KiB
Groovy
description = 'Spring Integration Java DSL'
|
|
|
|
apply plugin: 'java'
|
|
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'idea'
|
|
|
|
group = 'org.springframework.integration'
|
|
|
|
repositories {
|
|
if (version.endsWith('BUILD-SNAPSHOT')) {
|
|
maven { url 'http://repo.spring.io/libs-snapshot' }
|
|
}
|
|
maven { url 'http://repo.spring.io/libs-milestone' }
|
|
}
|
|
|
|
compileJava {
|
|
sourceCompatibility = 1.6
|
|
targetCompatibility = 1.6
|
|
}
|
|
|
|
compileTestJava {
|
|
sourceCompatibility = 1.8
|
|
}
|
|
|
|
ext {
|
|
activeMqVersion = '5.9.0'
|
|
apacheSshdVersion = '0.10.1'
|
|
embedMongoVersion = '1.46.0'
|
|
ftpServerVersion = '1.0.6'
|
|
jacocoVersion = '0.7.1.201405082137'
|
|
jmsApiVersion = '1.1-rev-1'
|
|
mailVersion = '1.4.7'
|
|
slf4jVersion = '1.7.7'
|
|
springIntegrationVersion = '4.0.3.RELEASE'
|
|
springBootVersion = '1.1.5.RELEASE'
|
|
|
|
linkHomepage = 'https://github.com/spring-projects/spring-integration-extensions'
|
|
linkCi = 'https://build.spring.io/browse/INTEXT'
|
|
linkIssue = 'https://jira.spring.io/browse/INTEXT'
|
|
linkScmUrl = 'https://github.com/spring-projects/spring-integration-extensions'
|
|
linkScmConnection = 'https://github.com/spring-projects/spring-integration-extensions.git'
|
|
linkScmDevConnection = 'git@github.com:spring-projects/spring-integration-extensions.git'
|
|
}
|
|
|
|
eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature'
|
|
|
|
// 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 {
|
|
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
|
|
|
|
['spring-integration-amqp'
|
|
, 'spring-integration-event'
|
|
, 'spring-integration-feed'
|
|
, 'spring-integration-ftp'
|
|
, 'spring-integration-gemfire'
|
|
, 'spring-integration-http'
|
|
, 'spring-integration-jdbc'
|
|
, 'spring-integration-jms'
|
|
, 'spring-integration-jmx'
|
|
, 'spring-integration-jpa'
|
|
, 'spring-integration-mail'
|
|
, 'spring-integration-mongodb'
|
|
, 'spring-integration-mqtt'
|
|
, 'spring-integration-redis'
|
|
, 'spring-integration-rmi'
|
|
, 'spring-integration-sftp'
|
|
, 'spring-integration-stream'
|
|
, 'spring-integration-syslog'
|
|
, 'spring-integration-twitter'
|
|
, 'spring-integration-ws'
|
|
, 'spring-integration-xml'
|
|
, 'spring-integration-xmpp'].each {
|
|
compile("org.springframework.integration:$it:$springIntegrationVersion", optional)
|
|
}
|
|
compile ("javax.jms:jms-api:$jmsApiVersion", provided)
|
|
compile ("javax.mail:javax.mail-api:$mailVersion", provided)
|
|
|
|
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
|
|
testCompile "de.flapdoodle.embed:de.flapdoodle.embed.mongo:$embedMongoVersion"
|
|
testCompile "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
|
|
testCompile "org.apache.sshd:sshd-core:$apacheSshdVersion"
|
|
testCompile "org.springframework.boot:spring-boot-autoconfigure:$springBootVersion"
|
|
|
|
testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion"
|
|
testRuntime("org.apache.activemq:activemq-broker:$activeMqVersion")
|
|
testRuntime("org.apache.activemq:activemq-kahadb-store:$activeMqVersion") {
|
|
exclude group: "org.springframework"
|
|
}
|
|
testRuntime "com.sun.mail:mailapi:$mailVersion"
|
|
testRuntime "com.sun.mail:smtp:$mailVersion"
|
|
testRuntime "com.sun.mail:pop3:$mailVersion"
|
|
testRuntime "com.sun.mail:imap:$mailVersion"
|
|
|
|
jacoco "org.jacoco:org.jacoco.agent:$jacocoVersion:runtime"
|
|
}
|
|
|
|
// enable all compiler warnings; individual projects may customize further
|
|
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all,-options']
|
|
|
|
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=*"
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allJava
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = 'javadoc'
|
|
from javadoc
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
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 the 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'
|
|
|
|
source = sourceSets.main.allJava
|
|
classpath = project.sourceSets.main.compileClasspath
|
|
destinationDir = new File(buildDir, "api")
|
|
}
|
|
|
|
task docsZip(type: Zip) {
|
|
group = 'Distribution'
|
|
classifier = 'docs'
|
|
description = "Builds -${classifier} archive containing the api " +
|
|
"for deployment at static.springframework.org/spring-integration/docs."
|
|
|
|
from(api) {
|
|
into 'api'
|
|
}
|
|
}
|
|
|
|
task distZip(type: Zip, dependsOn: docsZip) {
|
|
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 'license.txt'
|
|
include 'notice.txt'
|
|
into "${baseDir}"
|
|
}
|
|
|
|
from(zipTree(docsZip.archivePath)) {
|
|
into "${baseDir}/docs"
|
|
}
|
|
|
|
into("${baseDir}/libs") {
|
|
from project.jar
|
|
from project.sourcesJar
|
|
from project.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 projectName = rootProject.name
|
|
def artifacts = new HashSet()
|
|
|
|
rootProject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
|
|
def dependency = artifact.moduleVersion.id
|
|
if (!projectName.equals(dependency.name)) {
|
|
artifacts << artifact.file
|
|
}
|
|
}
|
|
|
|
zipTask.from(artifacts) {
|
|
into "${distZip.baseDir}/deps"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
archives distZip
|
|
archives docsZip
|
|
}
|
|
|
|
task dist(dependsOn: assemble) {
|
|
group = 'Distribution'
|
|
description = 'Builds -dist, -docs and distribution archives.'
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
description = 'Generates gradlew[.bat] scripts'
|
|
gradleVersion = '1.12'
|
|
distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
|
|
}
|