buildscript { ext.kotlinVersion = '1.5.32' repositories { mavenCentral() maven { url 'https://plugins.gradle.org/m2' } maven { url 'https://repo.spring.io/plugins-release-local' } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion" } } plugins { id 'org.sonarqube' version '2.8' id 'io.spring.nohttp' version '0.0.10' apply false id 'org.ajoberstar.grgit' version '4.1.1' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'com.jfrog.artifactory' version '4.28.1' apply false id 'org.jetbrains.dokka' version '1.5.30' id 'org.asciidoctor.jvm.pdf' version '3.3.2' id 'org.asciidoctor.jvm.gems' version '3.3.2' id 'org.asciidoctor.jvm.convert' version '3.3.2' } if (System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey')) { apply plugin: 'io.spring.nohttp' nohttp { allowlistFile = file('src/nohttp/allowlist.lines') source.include '**/src/**' source.exclude '**/*.gif', '**/*.jpg', '**/*.png', '**/*.svg', '**/*.ks' } } description = 'Spring Integration' ext { linkHomepage = 'https://projects.spring.io/spring-integration' linkCi = 'https://build.spring.io/browse/INT' linkIssue = 'https://github.com/spring-projects/spring-integration/issues' 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' modifiedFiles = files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') } activeMqVersion = '5.16.4' apacheSshdVersion = '2.7.0' aspectjVersion = '1.9.9.1' assertjVersion = '3.22.0' assertkVersion = '0.25' avroVersion = '1.10.2' awaitilityVersion = '4.2.0' commonsDbcp2Version = '2.9.0' commonsIoVersion = '2.11.0' commonsNetVersion = '3.8.0' curatorVersion = '4.3.0' derbyVersion = '10.14.2.0' ftpServerVersion = '1.1.1' googleJsr305Version = '3.0.2' greenmailVersion = '1.6.8' groovyVersion = '3.0.10' hamcrestVersion = '2.2' hazelcastVersion = '4.2.4' hibernateVersion = '5.5.9.Final' hsqldbVersion = '2.6.1' h2Version = '1.4.200' jacksonVersion = '2.12.6' javaxActivationVersion = '1.2.0' jaxbVersion = '2.3.4' jeroMqVersion = '0.5.2' jmsApiVersion = '2.0.1' jpaApiVersion = '2.7.7' jrubyVersion = '9.2.19.0' jschVersion = '0.1.55' jsonpathVersion = '2.6.0' junit4Version = '4.13.2' junitJupiterVersion = '5.7.2' jythonVersion = '2.7.2' kryoShadedVersion = '4.0.2' lettuceVersion = '6.1.8.RELEASE' log4jVersion = '2.17.2' mailVersion = '1.6.7' micrometerVersion = '1.7.11' mockitoVersion = '3.12.4' mongoDriverVersion = '4.3.4' mysqlVersion = '8.0.27' pahoMqttClientVersion = '1.2.5' postgresVersion = '42.2.23' r2dbch2Version='0.8.5.RELEASE' reactorVersion = '2020.0.17' resilience4jVersion = '1.7.1' romeToolsVersion = '1.16.0' rsocketVersion = '1.1.2' saajVersion = '1.5.2' servletApiVersion = '4.0.1' smackVersion = '4.3.5' soapVersion = '1.4.0' springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.3.16' springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2021.0.11' springKafkaVersion = '2.7.13' springRetryVersion = '1.3.3' springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.5.6' springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.3.19' springWsVersion = '3.1.3' testcontainersVersion = '1.17.1' tomcatVersion = '9.0.62' xmlUnitVersion = '2.8.2' xstreamVersion = '1.4.17' javaProjects = subprojects - project(':spring-integration-bom') } allprojects { group = 'org.springframework.integration' repositories { if (project.hasProperty('mavenLocal')) { mavenLocal() } mavenCentral() maven { url 'https://repo.spring.io/release' } maven { url 'https://repo.spring.io/milestone' } if (version.endsWith('SNAPSHOT')) { maven { url 'https://repo.spring.io/snapshot' } } // maven { url 'https://repo.spring.io/libs-staging-local' } } ext.javadocLinks = [ 'https://docs.oracle.com/en/java/javase/15/docs/api', 'https://docs.spring.io/spring-framework/docs/current/javadoc-api', 'https://docs.spring.io/spring-amqp/docs/current/api/', 'https://docs.spring.io/spring-data-gemfire/docs/current/api/', 'https://docs.spring.io/spring-data/data-mongo/docs/current/api/', 'https://docs.spring.io/spring-data/data-redis/docs/current/api/', 'https://docs.spring.io/spring-ws/docs/current/api/' ] as String[] apply plugin: 'io.spring.dependency-management' dependencyManagement { resolutionStrategy { cacheChangingModulesFor 0, 'seconds' } applyMavenExclusions = false generatedPomCustomization { enabled = false } imports { mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion" mavenBom "org.junit:junit-bom:$junitJupiterVersion" mavenBom "org.springframework:spring-framework-bom:$springVersion" mavenBom "io.projectreactor:reactor-bom:$reactorVersion" mavenBom "org.apache.logging.log4j:log4j-bom:$log4jVersion" mavenBom "org.springframework.data:spring-data-bom:$springDataVersion" } } } configure(javaProjects) { subproject -> apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'jacoco' apply plugin: 'checkstyle' apply plugin: 'kotlin' apply plugin: 'kotlin-spring' apply from: "${rootDir}/gradle/publish-maven.gradle" sourceSets { test { resources { srcDirs = ['src/test/resources', 'src/test/java'] } } } java { withJavadocJar() withSourcesJar() registerFeature('optional') { usingSourceSet(sourceSets.main) } registerFeature('provided') { usingSourceSet(sourceSets.main) } } compileJava { options.release = 8 } compileTestJava { sourceCompatibility = 11 targetCompatibility = 11 options.encoding = 'UTF-8' } compileKotlin { kotlinOptions { apiVersion = '1.3' jvmTarget = '1.8' freeCompilerArgs = ['-Xjsr305=strict'] // allWarningsAsErrors = true TODO bring it back after upgrading to Kotlin 1.5 language version } } compileTestKotlin { kotlinOptions { jvmTarget = '11' } } tasks.withType(JavaCompile).configureEach { options.fork = true } tasks.withType(Javadoc) { options.addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint } eclipse { project { natures += 'org.springframework.ide.eclipse.core.springnature' } } jacoco { toolVersion = '0.8.7' } // dependencies that are common across all java projects dependencies { if (!(subproject.name ==~ /.*-test.*/)) { testImplementation(project(':spring-integration-test-support')) { exclude group: 'org.hamcrest' } } // JSR-305 only used for non-required meta-annotations compileOnly "com.google.code.findbugs:jsr305:$googleJsr305Version" testImplementation "com.google.code.findbugs:jsr305:$googleJsr305Version" testImplementation("org.awaitility:awaitility:$awaitilityVersion") { exclude group: 'org.hamcrest' } testImplementation ("junit:junit:$junit4Version") { exclude group: 'org.hamcrest' } testImplementation 'org.junit.jupiter:junit-jupiter-api' testImplementation ("com.willowtreeapps.assertk:assertk-jvm:$assertkVersion") { exclude group: 'org.jetbrains.kotlin' } testImplementation 'org.jetbrains.kotlin:kotlin-reflect' testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' testImplementation 'io.projectreactor:reactor-test' testImplementation "org.testcontainers:junit-jupiter:$testcontainersVersion" testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' // To support JUnit 4 tests testRuntimeOnly 'org.junit.vintage:junit-vintage-engine' testRuntimeOnly 'org.apache.logging.log4j:log4j-core' testRuntimeOnly 'org.apache.logging.log4j:log4j-jcl' testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl' } // enable all compiler warnings; individual projects may customize further ext.xLintArg = '-Xlint:all,-options,-processing' [compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg, '-parameters'] task updateCopyrights { onlyIf { !System.getenv('GITHUB_ACTION') && !System.getenv('bamboo_buildKey') } inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) }) outputs.dir('build/classes') doLast { def now = Calendar.instance.get(Calendar.YEAR) as String inputs.files.each { file -> def line file.withReader { reader -> while (line = reader.readLine()) { def matcher = line =~ /Copyright (20\d\d)-?(20\d\d)?/ if (matcher.count) { def beginningYear = matcher[0][1] if (now != beginningYear && now != matcher[0][2]) { def years = "$beginningYear-$now" def sourceCode = file.text sourceCode = sourceCode.replaceFirst(/20\d\d(-20\d\d)?/, years) file.text = sourceCode println "Copyright updated for file: $file" } break } } } } } } compileKotlin.dependsOn updateCopyrights jacocoTestReport { reports { xml.enabled true csv.enabled false html.enabled false xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml") } } test { maxHeapSize = '2g' jvmArgs '-XX:+HeapDumpOnOutOfMemoryError' jacoco { destinationFile = file("$buildDir/jacoco.exec") } if (System.properties['sonar.host.url']) { finalizedBy jacocoTestReport } } task testAll(type: Test, dependsOn: [':checkAsciidocLinks', 'check']) gradle.taskGraph.whenReady { graph -> if (graph.hasTask(testAll)) { test.enabled = false } } tasks.withType(Test).all { // suppress all console output during testing unless running `gradle -i` logging.captureStandardOutput(LogLevel.INFO) if (name ==~ /(testAll)/) { systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true' } environment 'SI_FATAL_WHEN_NO_BEANFACTORY', 'true' useJUnitPlatform() enableAssertions = false } checkstyle { configDirectory.set(rootProject.file('src/checkstyle')) toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '9.3' } jar { manifest { attributes( 'Implementation-Version': project.version, 'Created-By': "JDK ${System.properties['java.version']} (${System.properties['java.specification.vendor']})", 'Implementation-Title': subproject.name, 'Implementation-Vendor-Id': subproject.group, 'Implementation-Vendor': 'Pivotal Software, Inc.', 'Implementation-URL': linkHomepage, 'Automatic-Module-Name': subproject.name.replace('-', '.') // for Jigsaw ) } from("${rootProject.projectDir}/src/dist") { include 'notice.txt' into 'META-INF' expand(copyright: new Date().format('yyyy'), version: project.version) } from("${rootProject.projectDir}") { include 'LICENSE.txt' into 'META-INF' } } check.dependsOn javadoc publishing { publications { mavenJava(MavenPublication) { suppressAllPomMetadataWarnings() from components.java pom.withXml { def pomDeps = asNode().dependencies.first() subproject.configurations.providedImplementation.allDependencies.each { dep -> pomDeps.remove(pomDeps.'*'.find { it.artifactId.text() == dep.name }) pomDeps.appendNode('dependency').with { it.appendNode('groupId', dep.group) it.appendNode('artifactId', dep.name) it.appendNode('version', dep.version) it.appendNode('scope', 'provided') } } } } } } } project('spring-integration-test-support') { description = 'Spring Integration Test Support - **No SI Dependencies Allowed**' dependencies { compileOnly 'org.apiguardian:apiguardian-api:1.0.0' api "org.hamcrest:hamcrest-library:$hamcrestVersion" api "org.mockito:mockito-core:$mockitoVersion" api "org.assertj:assertj-core:$assertjVersion" api 'org.springframework:spring-context' api 'org.springframework:spring-messaging' api 'org.springframework:spring-test' optionalApi ("junit:junit:$junit4Version") { exclude group: 'org.hamcrest' } optionalApi 'org.junit.jupiter:junit-jupiter-api' optionalApi 'org.apache.logging.log4j:log4j-core' } } project('spring-integration-amqp') { description = 'Spring Integration AMQP Support' dependencies { api project(':spring-integration-core') api("org.springframework.amqp:spring-rabbit:$springAmqpVersion") { exclude group: 'org.springframework' } testImplementation("org.springframework.amqp:spring-rabbit-junit:$springAmqpVersion") { exclude group: 'org.springframework' } testImplementation project(':spring-integration-stream') testImplementation 'org.springframework:spring-web' } } project('spring-integration-core') { description = 'Spring Integration Core' apply plugin: 'org.jetbrains.dokka' dependencies { api 'org.springframework:spring-aop' api 'org.springframework:spring-context' api 'org.springframework:spring-messaging' api 'org.springframework:spring-tx' api ("org.springframework.retry:spring-retry:$springRetryVersion") { exclude group: 'org.springframework' } api 'io.projectreactor:reactor-core' optionalApi 'com.fasterxml.jackson.core:jackson-databind' optionalApi 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8' optionalApi 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' optionalApi 'com.fasterxml.jackson.datatype:jackson-datatype-joda' optionalApi ('com.fasterxml.jackson.module:jackson-module-kotlin') { exclude group: 'org.jetbrains.kotlin' } optionalApi "com.jayway.jsonpath:json-path:$jsonpathVersion" optionalApi "com.esotericsoftware:kryo-shaded:$kryoShadedVersion" optionalApi "io.micrometer:micrometer-core:$micrometerVersion" optionalApi "io.github.resilience4j:resilience4j-ratelimiter:$resilience4jVersion" optionalApi "org.apache.avro:avro:$avroVersion" optionalApi 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' testImplementation "org.aspectj:aspectjweaver:$aspectjVersion" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" } dokkaHtmlPartial { outputDirectory.set(new File(buildDir, 'docs/kdoc')) dokkaSourceSets { main { sourceRoots.setFrom(file('src/main/kotlin')) classpath.from(sourceSets['main'].runtimeClasspath) externalDocumentationLink { url.set(new URL("https://docs.spring.io/spring-integration/docs/$version/api/")) packageListUrl.set(file("$buildDir/docs/javadoc/element-list").toURI().toURL()) } externalDocumentationLink { url.set(new URL('https://projectreactor.io/docs/core/release/api/')) } externalDocumentationLink { url.set(new URL('https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/')) } } } } } project('spring-integration-event') { description = 'Spring Integration ApplicationEvent Support' dependencies { api project(':spring-integration-core') } } project('spring-integration-feed') { description = 'Spring Integration RSS Feed Support' dependencies { api project(':spring-integration-core') api "com.rometools:rome:$romeToolsVersion" } } project('spring-integration-file') { description = 'Spring Integration File Support' dependencies { api project(':spring-integration-core') api "commons-io:commons-io:$commonsIoVersion" testImplementation project(':spring-integration-redis') testImplementation project(':spring-integration-redis').sourceSets.test.output testImplementation project(':spring-integration-gemfire') testImplementation project(':spring-integration-jdbc') testImplementation "com.h2database:h2:$h2Version" testImplementation "io.lettuce:lettuce-core:$lettuceVersion" testImplementation "com.jayway.jsonpath:json-path:$jsonpathVersion" } } project('spring-integration-ftp') { description = 'Spring Integration FTP Support' dependencies { api project(':spring-integration-file') api "commons-net:commons-net:$commonsNetVersion" api 'org.springframework:spring-context-support' optionalApi "org.apache.ftpserver:ftpserver-core:$ftpServerVersion" testImplementation project(':spring-integration-file').sourceSets.test.output testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" } } project('spring-integration-gemfire') { description = 'Spring Integration GemFire Support' dependencies { api project(':spring-integration-core') api ('org.springframework.data:spring-data-geode') { exclude group: 'org.springframework' } api "commons-io:commons-io:$commonsIoVersion" testImplementation project(':spring-integration-stream') } } project('spring-integration-groovy') { description = 'Spring Integration Groovy Support' dependencies { api project(':spring-integration-scripting') api "org.codehaus.groovy:groovy:$groovyVersion" api 'org.springframework:spring-context-support' testImplementation 'org.springframework:spring-web' testRuntimeOnly "org.codehaus.groovy:groovy-dateutil:$groovyVersion" } } project('spring-integration-http') { description = 'Spring Integration HTTP Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-webmvc' providedImplementation "javax.servlet:javax.servlet-api:$servletApiVersion" optionalApi "com.rometools:rome:$romeToolsVersion" optionalApi 'org.springframework:spring-webflux' testImplementation project(':spring-integration-security') testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" testImplementation ("org.springframework.security:spring-security-config:$springSecurityVersion") { exclude group: 'org.springframework' } testImplementation ("org.springframework.security:spring-security-test:$springSecurityVersion") { exclude group: 'org.springframework' } testImplementation 'com.fasterxml.jackson.core:jackson-databind' testRuntimeOnly "com.jayway.jsonpath:json-path:$jsonpathVersion" } } project('spring-integration-ip') { description = 'Spring Integration IP Support' dependencies { api project(':spring-integration-core') testImplementation project(':spring-integration-stream') testImplementation project(':spring-integration-event') testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" testRuntimeOnly "com.esotericsoftware:kryo-shaded:$kryoShadedVersion" testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind' } } project('spring-integration-jdbc') { description = 'Spring Integration JDBC Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-jdbc' testImplementation "com.h2database:h2:$h2Version" testImplementation "org.hsqldb:hsqldb:$hsqldbVersion" testImplementation "org.apache.derby:derby:$derbyVersion" testImplementation "org.apache.derby:derbyclient:$derbyVersion" testImplementation "org.postgresql:postgresql:$postgresVersion" testImplementation "mysql:mysql-connector-java:$mysqlVersion" testImplementation "org.apache.commons:commons-dbcp2:$commonsDbcp2Version" testImplementation "org.testcontainers:mysql:$testcontainersVersion" testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind' } } project('spring-integration-jms') { description = 'Spring Integration JMS Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-jms' providedImplementation "javax.jms:javax.jms-api:$jmsApiVersion" testImplementation "org.apache.activemq:activemq-broker:$activeMqVersion" testImplementation 'org.springframework:spring-oxm' } } project('spring-integration-jmx') { description = 'Spring Integration JMX Support' dependencies { api project(':spring-integration-core') testImplementation "org.aspectj:aspectjweaver:$aspectjVersion" testImplementation "com.hazelcast:hazelcast:$hazelcastVersion" } } project('spring-integration-jpa') { description = 'Spring Integration JPA Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-orm' optionalApi "org.eclipse.persistence:org.eclipse.persistence.jpa:$jpaApiVersion" testImplementation ('org.springframework.data:spring-data-jpa') { exclude group: 'org.springframework' } testImplementation "com.h2database:h2:$h2Version" testImplementation "org.hibernate:hibernate-entitymanager:$hibernateVersion" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" } } project('spring-integration-kafka') { description = 'Spring Integration for Apache Kafka' dependencies { api project(':spring-integration-core') api ("org.springframework.kafka:spring-kafka:$springKafkaVersion") { exclude group: 'org.springframework' } testImplementation "org.springframework.kafka:spring-kafka-test:$springKafkaVersion" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind' } } project('spring-integration-mail') { description = 'Spring Integration Mail Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-context-support' providedImplementation "com.sun.mail:jakarta.mail:$mailVersion" testImplementation "com.icegreen:greenmail:$greenmailVersion" testRuntimeOnly 'org.apache.logging.log4j:log4j-jul' } } project('spring-integration-mongodb') { description = 'Spring Integration MongoDB Support' dependencies { api project(':spring-integration-core') api ('org.springframework.data:spring-data-mongodb') { exclude group: 'org.springframework' } optionalApi "org.mongodb:mongodb-driver-sync:$mongoDriverVersion" optionalApi "org.mongodb:mongodb-driver-reactivestreams:$mongoDriverVersion" } } project('spring-integration-r2dbc') { description = 'Spring Integration R2DBC Support' dependencies { api project(':spring-integration-core') api ('org.springframework.data:spring-data-r2dbc') { exclude group: 'org.springframework' } api 'org.springframework:spring-r2dbc' testImplementation "io.r2dbc:r2dbc-h2:$r2dbch2Version" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" } } project('spring-integration-mqtt') { description = 'Spring Integration MQTT Support' dependencies { api project(':spring-integration-core') api "org.eclipse.paho:org.eclipse.paho.client.mqttv3:$pahoMqttClientVersion" optionalApi "org.eclipse.paho:org.eclipse.paho.mqttv5.client:$pahoMqttClientVersion" testImplementation project(':spring-integration-jmx') testImplementation 'com.fasterxml.jackson.core:jackson-databind' } } project('spring-integration-redis') { description = 'Spring Integration Redis Support' dependencies { api project(':spring-integration-core') api ('org.springframework.data:spring-data-redis') { exclude group: 'org.springframework' } testImplementation "io.lettuce:lettuce-core:$lettuceVersion" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" testImplementation 'com.fasterxml.jackson.core:jackson-databind' } } project('spring-integration-rmi') { description = 'Spring Integration RMI Support' dependencies { api project(':spring-integration-core') } } project('spring-integration-rsocket') { description = 'Spring Integration RSocket Support' dependencies { api project(':spring-integration-core') api "io.rsocket:rsocket-transport-netty:$rsocketVersion" } } project('spring-integration-scripting') { description = 'Spring Integration Scripting Support' dependencies { api project(':spring-integration-core') optionalApi 'org.jetbrains.kotlin:kotlin-script-util' optionalApi 'org.jetbrains.kotlin:kotlin-compiler-embeddable' testImplementation "org.jruby:jruby-complete:$jrubyVersion" testImplementation "org.codehaus.groovy:groovy:$groovyVersion" testImplementation "org.codehaus.groovy:groovy-jsr223:$groovyVersion" testImplementation "org.python:jython-standalone:$jythonVersion" testRuntimeOnly 'org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable' } } project('spring-integration-security') { description = 'Spring Integration Security Support' dependencies { api project(':spring-integration-core') api ("org.springframework.security:spring-security-core:$springSecurityVersion") { exclude group: 'org.springframework' } testImplementation ("org.springframework.security:spring-security-config:$springSecurityVersion") { exclude group: 'org.springframework' } } } project('spring-integration-sftp') { description = 'Spring Integration SFTP Support' dependencies { api project(':spring-integration-file') api "com.jcraft:jsch:$jschVersion" api 'org.springframework:spring-context-support' optionalApi "org.apache.sshd:sshd-sftp:$apacheSshdVersion" testImplementation "org.apache.sshd:sshd-core:$apacheSshdVersion" testImplementation project(':spring-integration-event') testImplementation project(':spring-integration-file').sourceSets.test.output } } project('spring-integration-stomp') { description = 'Spring Integration STOMP Support' dependencies { api project(':spring-integration-core') optionalApi 'org.springframework:spring-websocket' optionalApi 'io.projectreactor.netty:reactor-netty-core' testImplementation project(':spring-integration-websocket') testImplementation project(':spring-integration-websocket').sourceSets.test.output testImplementation project(':spring-integration-event') testImplementation "org.apache.activemq:activemq-stomp:$activeMqVersion" testImplementation "org.apache.tomcat.embed:tomcat-embed-websocket:$tomcatVersion" testRuntimeOnly 'org.springframework:spring-webmvc' } } project('spring-integration-stream') { description = 'Spring Integration Stream Support' dependencies { api project(':spring-integration-core') } } project('spring-integration-syslog') { description = 'Spring Integration Syslog Support' dependencies { api project(':spring-integration-ip') } } project('spring-integration-test') { description = 'Spring Integration Testing Framework' dependencies { api project(':spring-integration-core') api project(':spring-integration-test-support') } } project('spring-integration-webflux') { description = 'Spring Integration HTTP Support' dependencies { api (project(':spring-integration-http')) { exclude group: 'org.springframework', module: 'spring-webmvc' } api 'org.springframework:spring-webflux' optionalApi 'io.projectreactor.netty:reactor-netty-http' testImplementation "javax.servlet:javax.servlet-api:$servletApiVersion" testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" testImplementation 'org.springframework:spring-webmvc' testImplementation ("org.springframework.security:spring-security-config:$springSecurityVersion") { exclude group: 'org.springframework' } testImplementation ("org.springframework.security:spring-security-test:$springSecurityVersion") { exclude group: 'org.springframework' } testImplementation 'com.fasterxml.jackson.core:jackson-databind' testRuntimeOnly "com.jayway.jsonpath:json-path:$jsonpathVersion" } } project('spring-integration-websocket') { description = 'Spring Integration WebSockets Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-websocket' optionalApi 'org.springframework:spring-webmvc' providedImplementation "javax.servlet:javax.servlet-api:$servletApiVersion" testImplementation project(':spring-integration-event') testImplementation "org.apache.tomcat.embed:tomcat-embed-websocket:$tomcatVersion" testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind' } } project('spring-integration-ws') { description = 'Spring Integration Web Services Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-oxm' api 'org.springframework:spring-webmvc' api ("org.springframework.ws:spring-ws-core:$springWsVersion") { exclude group: 'org.springframework' } optionalApi "javax.activation:javax.activation-api:$javaxActivationVersion" providedImplementation "javax.xml.soap:javax.xml.soap-api:$soapVersion" providedImplementation "com.sun.xml.bind:jaxb-impl:$jaxbVersion" providedImplementation "com.sun.xml.messaging.saaj:saaj-impl:$saajVersion" testImplementation "com.thoughtworks.xstream:xstream:$xstreamVersion" testImplementation ("org.springframework.ws:spring-ws-support:$springWsVersion") { exclude group: 'org.springframework' } testImplementation 'org.springframework:spring-jms' testImplementation "javax.jms:javax.jms-api:$jmsApiVersion" testImplementation "org.igniterealtime.smack:smack-tcp:$smackVersion" testImplementation "org.igniterealtime.smack:smack-extensions:$smackVersion" testImplementation "jakarta.mail:jakarta.mail-api:$mailVersion" testRuntimeOnly "com.sun.mail:mailapi:$mailVersion" testRuntimeOnly "com.sun.mail:jakarta.mail:$mailVersion" } } project('spring-integration-xml') { description = 'Spring Integration XML Support' dependencies { api project(':spring-integration-core') api 'org.springframework:spring-oxm' api ("org.springframework.ws:spring-xml:$springWsVersion") { exclude group: 'org.springframework' } optionalApi ("org.springframework.ws:spring-ws-core:$springWsVersion") { exclude group: 'org.springframework' } testImplementation "com.sun.xml.bind:jaxb-impl:$jaxbVersion" testImplementation "org.xmlunit:xmlunit-assertj3:$xmlUnitVersion" } } project('spring-integration-xmpp') { description = 'Spring Integration XMPP Support' dependencies { api project(':spring-integration-core') api "org.igniterealtime.smack:smack-tcp:$smackVersion" api "org.igniterealtime.smack:smack-java7:$smackVersion" api "org.igniterealtime.smack:smack-extensions:$smackVersion" testImplementation project(':spring-integration-stream') testImplementation "org.igniterealtime.smack:smack-experimental:$smackVersion" } } project('spring-integration-zeromq') { description = 'Spring Integration ZeroMQ Support' dependencies { api project(':spring-integration-core') api "org.zeromq:jeromq:$jeroMqVersion" optionalApi 'com.fasterxml.jackson.core:jackson-databind' testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" } } project('spring-integration-zookeeper') { description = 'Spring Integration Zookeeper Support' dependencies { api project(':spring-integration-core') api "org.apache.curator:curator-recipes:$curatorVersion" testImplementation "org.apache.curator:curator-test:$curatorVersion" } } project('spring-integration-bom') { description = 'Spring Integration (Bill of Materials)' apply plugin: 'java-platform' apply from: "${rootDir}/gradle/publish-maven.gradle" dependencies { constraints { javaProjects.sort { "$it.name" }.each { api it } } } publishing { publications { mavenJava(MavenPublication) { from components.javaPlatform } } } sonarqube { skipProject = true } } sonarqube { properties { 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 } } 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') options.links(project.ext.javadocLinks) options.addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint source javaProjects.collect { project -> project.sourceSets.main.allJava } destinationDir = new File(buildDir, 'api') classpath = files(javaProjects.collect { project -> project.sourceSets.main.compileClasspath }) } dokkaHtmlMultiModule { dependsOn api moduleName.set('spring-integration') outputDirectory.set(file("$buildDir/docs/kdoc")) } apply from: "${rootDir}/gradle/docs.gradle" task schemaZip(type: Zip) { group = 'Distribution' archiveClassifier = 'schema' description = "Builds -${archiveClassifier} archive containing all " + "XSDs for deployment at static.springframework.org/schema." duplicatesStrategy = DuplicatesStrategy.EXCLUDE javaProjects.each { subproject -> 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${File.separator}spring.schemas") }?.withInputStream { schemas.load(it) } for (def key : schemas.keySet()) { File xsdFile = subproject.sourceSets.main.resources.find { it.path.replaceAll('\\\\', '/').endsWith(schemas.get(key)) } assert xsdFile != null into ("integration/$shortName") { from xsdFile.path rename { String fileName -> String[] versionNumbers = project.version.split(/\./, 3) fileName.replace('.xsd', "-${versionNumbers[0]}.${versionNumbers[1]}.xsd") } } } } } task docsZip(type: Zip, dependsOn: [reference, dokkaHtmlMultiModule]) { group = 'Distribution' archiveClassifier = 'docs' description = "Builds -${archiveClassifier} 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 ('build/docs/asciidoc') { into 'reference/html' } from ('build/docs/asciidocPdf') { include 'index-single.pdf' rename 'index-single.pdf', 'spring-integration-reference.pdf' into 'reference/pdf' } from(dokkaHtmlMultiModule.outputDirectory) { into 'kdoc-api' } } task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) { group = 'Distribution' archiveClassifier = 'dist' description = "Builds -${archiveClassifier} archive, containing all jars and docs, " + "suitable for community download page." ext.baseDir = "${project.name}-${project.version}"; from('src/dist') { include 'readme.txt' include 'notice.txt' into "${baseDir}" expand(copyright: new Date().format('yyyy'), version: project.version) } from("$project.rootDir") { include 'LICENSE.txt' into "${baseDir}" } from(zipTree(docsZip.archiveFile)) { into "${baseDir}/docs" } from(zipTree(schemaZip.archiveFile)) { into "${baseDir}/schema" } javaProjects.each { subproject -> into ("${baseDir}/libs") { from subproject.jar from subproject.sourcesJar from subproject.javadocJar } } } task dist(dependsOn: assemble) { group = 'Distribution' description = 'Builds -dist, -docs and -schema distribution archives.' } apply from: "${rootDir}/gradle/publish-maven.gradle" publishing { publications { mavenJava(MavenPublication) { artifact docsZip artifact schemaZip artifact distZip } } }