Skip to content

Commit e6e1ee0

Browse files
committed
Migrate to Gradle platform
* Remove now redundant `io.spring.dependency-management` plugin * Remove some excludes from dependencies which are now not there
1 parent 173c408 commit e6e1ee0

File tree

1 file changed

+44
-51
lines changed

1 file changed

+44
-51
lines changed

build.gradle

Lines changed: 44 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ buildscript {
1717
plugins {
1818
id 'base'
1919
id 'io.spring.nohttp' version '0.0.11' apply false
20-
id 'io.spring.dependency-management' version '1.1.7'
2120
id 'org.jetbrains.dokka' version '2.1.0' apply false
2221
id 'org.antora' version '1.0.0'
2322
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
@@ -144,41 +143,37 @@ allprojects {
144143
'https://docs.spring.io/spring-ws/docs/current/api/'
145144
] as String[]
146145

147-
apply plugin: 'io.spring.dependency-management'
148-
149-
dependencyManagement {
150-
resolutionStrategy {
151-
cacheChangingModulesFor 0, 'seconds'
152-
}
153-
applyMavenExclusions = false
154-
generatedPomCustomization {
155-
enabled = false
156-
}
157-
158-
imports {
159-
mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion"
160-
mavenBom "tools.jackson:jackson-bom:$jackson3Version"
161-
mavenBom "io.micrometer:micrometer-bom:$micrometerVersion"
162-
mavenBom "io.micrometer:micrometer-tracing-bom:$micrometerTracingVersion"
163-
mavenBom "io.projectreactor:reactor-bom:$reactorVersion"
164-
mavenBom "org.apache.camel:camel-bom:$camelVersion"
165-
mavenBom "org.apache.groovy:groovy-bom:$groovyVersion"
166-
mavenBom "org.apache.logging.log4j:log4j-bom:$log4jVersion"
167-
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:$kotlinCoroutinesVersion"
168-
mavenBom "org.junit:junit-bom:$junitJupiterVersion"
169-
mavenBom "org.mockito:mockito-bom:$mockitoVersion"
170-
mavenBom "org.springframework.amqp:spring-amqp-bom:$springAmqpVersion"
171-
mavenBom "org.springframework.data:spring-data-bom:$springDataVersion"
172-
mavenBom "org.springframework.kafka:spring-kafka-bom:$springKafkaVersion"
173-
mavenBom "org.springframework.security:spring-security-bom:$springSecurityVersion"
174-
mavenBom "org.springframework:spring-framework-bom:$springVersion"
175-
mavenBom "org.springframework.ws:spring-ws-bom:$springWsVersion"
176-
mavenBom "org.testcontainers:testcontainers-bom:$testcontainersVersion"
177-
mavenBom "org.mongodb:mongodb-driver-bom:$mongoDriverVersion"
178-
}
146+
configurations {
147+
dependencyManagement {
148+
canBeConsumed = false
149+
canBeResolved = false
150+
}
179151

180-
}
152+
configureEach {
153+
resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
154+
}
155+
}
181156

157+
dependencies {
158+
dependencyManagement(platform("com.fasterxml.jackson:jackson-bom:$jacksonVersion"))
159+
dependencyManagement(platform("tools.jackson:jackson-bom:$jackson3Version"))
160+
dependencyManagement(platform("org.junit:junit-bom:$junitJupiterVersion"))
161+
dependencyManagement(platform("org.springframework:spring-framework-bom:$springVersion"))
162+
dependencyManagement(platform("io.projectreactor:reactor-bom:$reactorVersion"))
163+
dependencyManagement(platform("org.apache.logging.log4j:log4j-bom:$log4jVersion"))
164+
dependencyManagement(platform("org.springframework.data:spring-data-bom:$springDataVersion"))
165+
dependencyManagement(platform("io.micrometer:micrometer-bom:$micrometerVersion"))
166+
dependencyManagement(platform("io.micrometer:micrometer-tracing-bom:$micrometerTracingVersion"))
167+
dependencyManagement(platform("org.testcontainers:testcontainers-bom:$testcontainersVersion"))
168+
dependencyManagement(platform("org.apache.camel:camel-bom:$camelVersion"))
169+
dependencyManagement(platform("org.apache.groovy:groovy-bom:$groovyVersion"))
170+
dependencyManagement(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:$kotlinCoroutinesVersion"))
171+
dependencyManagement(platform("org.springframework.amqp:spring-amqp-bom:$springAmqpVersion"))
172+
dependencyManagement(platform("org.springframework.kafka:spring-kafka-bom:$springKafkaVersion"))
173+
dependencyManagement(platform("org.springframework.security:spring-security-bom:$springSecurityVersion"))
174+
dependencyManagement(platform("org.springframework.ws:spring-ws-bom:$springWsVersion"))
175+
dependencyManagement(platform("org.mongodb:mongodb-driver-bom:$mongoDriverVersion"))
176+
}
182177
}
183178

184179
configure(javaProjects) { subproject ->
@@ -201,13 +196,10 @@ configure(javaProjects) { subproject ->
201196
}
202197
}
203198

204-
[compileClasspath, testCompileClasspath, testRuntimeClasspath].each {
199+
[compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath].each {
205200
it.extendsFrom(provided)
201+
it.extendsFrom(dependencyManagement)
206202
}
207-
208-
configureEach {
209-
resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
210-
}
211203
}
212204

213205
components.java.with {
@@ -439,7 +431,7 @@ project('spring-integration-test-support') {
439431
description = 'Spring Integration Test Support - **No SI Dependencies Allowed**'
440432
dependencies {
441433
api "org.hamcrest:hamcrest-library:$hamcrestVersion"
442-
api 'org.mockito:mockito-core'
434+
api "org.mockito:mockito-core:$mockitoVersion"
443435
api "org.assertj:assertj-core:$assertjVersion"
444436
api 'org.springframework:spring-context'
445437
api 'org.springframework:spring-messaging'
@@ -495,7 +487,13 @@ project('spring-integration-core') {
495487

496488
apply plugin: 'com.google.protobuf'
497489

498-
dependencies {
490+
configurations {
491+
[compileProtoPath, testCompileProtoPath].each {
492+
it.extendsFrom(dependencyManagement)
493+
}
494+
}
495+
496+
dependencies {
499497
api 'org.springframework:spring-aop'
500498
api 'org.springframework:spring-context'
501499
api 'org.springframework:spring-messaging'
@@ -741,9 +739,7 @@ project('spring-integration-kafka') {
741739
dependencies {
742740
api 'org.springframework.kafka:spring-kafka'
743741

744-
testImplementation ('org.springframework.kafka:spring-kafka-test') {
745-
exclude group: 'ch.qos.logback'
746-
}
742+
testImplementation 'org.springframework.kafka:spring-kafka-test'
747743
testImplementation 'tools.jackson.core:jackson-databind'
748744
}
749745
}
@@ -835,9 +831,7 @@ project('spring-integration-sftp') {
835831
dependencies {
836832
api project(':spring-integration-file')
837833
api 'org.springframework:spring-context-support'
838-
api("org.apache.sshd:sshd-sftp:$apacheSshdVersion") {
839-
exclude group: 'org.slf4j', module: 'jcl-over-slf4j'
840-
}
834+
api "org.apache.sshd:sshd-sftp:$apacheSshdVersion"
841835

842836
testImplementation project(':spring-integration-event')
843837
testImplementation project(':spring-integration-file').sourceSets.test.output
@@ -864,10 +858,7 @@ project('spring-integration-stomp') {
864858
testImplementation project(':spring-integration-websocket')
865859
testImplementation project(':spring-integration-websocket').sourceSets.test.output
866860
testImplementation project(':spring-integration-event')
867-
testImplementation("org.apache.activemq:artemis-stomp-protocol:$artemisVersion") {
868-
exclude group: 'org.jboss.logmanager'
869-
exclude group: 'io.netty'
870-
}
861+
testImplementation "org.apache.activemq:artemis-stomp-protocol:$artemisVersion"
871862
testImplementation "org.apache.tomcat.embed:tomcat-embed-websocket:$tomcatVersion"
872863
testImplementation 'tools.jackson.core:jackson-databind'
873864

@@ -1055,6 +1046,8 @@ dependencies {
10551046
}
10561047
}
10571048

1049+
configurations.javadocClasspath.extendsFrom(configurations.dependencyManagement)
1050+
10581051
javadoc {
10591052
title = "${rootProject.description} ${version} API"
10601053
options {

0 commit comments

Comments
 (0)