Limit spring boot version in grails latest dep tests (#7310)

Fixes #7309 
Fixes #7308
This commit is contained in:
Mateusz Rzeszutek 2022-11-25 15:14:09 +01:00 committed by GitHub
parent 7e2924c7cd
commit 2b8f13830a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 61 additions and 13 deletions

View File

@ -33,6 +33,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
testLibrary("org.springframework.boot:spring-boot-starter-tomcat:$springBootVersion")
latestDepTestLibrary("org.springframework.boot:spring-boot-autoconfigure:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+")
}
// testing-common pulls in groovy 4 and spock as dependencies, exclude them

View File

@ -25,10 +25,22 @@ tasks.withType<Test>().configureEach {
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
val latestDepTest = findProperty("testLatestDeps") as Boolean
// spring 6 (spring boot 3) requires java 17
if (latestDepTest) {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}
}
// spring 6 (spring boot 3) uses slf4j 2.0
if (!latestDepTest) {
configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
}

View File

@ -34,6 +34,8 @@ dependencies {
testImplementation("javax.servlet:javax.servlet-api:3.1.0")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
tasks {

View File

@ -16,6 +16,8 @@ dependencies {
testLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:2.2.1.RELEASE")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
tasks {

View File

@ -29,6 +29,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
latestDepTestLibrary("org.springframework.kafka:spring-kafka:2.+")
// TODO: temp change, will be reverted in #7271
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
testing {

View File

@ -20,6 +20,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
latestDepTestLibrary("org.springframework.kafka:spring-kafka:2.+")
// TODO: temp change, will be reverted in #7271
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
configurations.testRuntimeClasspath {

View File

@ -21,8 +21,6 @@ dependencies {
testLibrary("org.springframework.amqp:spring-rabbit:2.1.7.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-test:1.5.22.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter:1.5.22.RELEASE")
latestDepTestLibrary("org.springframework.amqp:spring-rabbit:2.+")
}
tasks {
@ -31,10 +29,22 @@ tasks {
}
}
configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
val latestDepTest = findProperty("testLatestDeps") as Boolean
// spring 6 requires java 17
if (latestDepTest) {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}
}
// spring 6 uses slf4j 2.0
if (!latestDepTest) {
configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
force("ch.qos.logback:logback-classic:1.2.11")
force("org.slf4j:slf4j-api:1.7.36")
}
}
}

View File

@ -23,6 +23,7 @@ dependencies {
latestDepTestLibrary("org.springframework:spring-context:5.+")
latestDepTestLibrary("org.springframework:spring-aop:5.+")
latestDepTestLibrary("org.springframework.boot:spring-boot:2.+")
}
tasks.withType<Test>().configureEach {

View File

@ -5,7 +5,8 @@ plugins {
dependencies {
compileOnly("org.springframework:spring-web:3.1.0.RELEASE")
testImplementation("org.springframework:spring-web:3.1.0.RELEASE")
testLibrary("org.springframework:spring-web:3.1.0.RELEASE")
latestDepTestLibrary("org.springframework:spring-web:5.+")
testImplementation(project(":testing-common"))
testImplementation("io.opentelemetry:opentelemetry-sdk-testing")

View File

@ -57,6 +57,10 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-test:2.0.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-reactor-netty:2.0.0.RELEASE")
testImplementation("org.spockframework:spock-spring:1.1-groovy-2.4")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-webflux:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-reactor-netty:2.+")
}
tasks.withType<Test>().configureEach {

View File

@ -40,6 +40,10 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-web:1.5.17.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-security:1.5.17.RELEASE")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-security:2.+")
testImplementation("org.springframework.security.oauth:spring-security-oauth2:2.0.16.RELEASE")
// For spring security

View File

@ -38,6 +38,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-web-services:2.0.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-web:2.0.0.RELEASE")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web-services:2.+")
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+")
testImplementation("wsdl4j:wsdl4j:1.6.3")
testImplementation("com.sun.xml.messaging.saaj:saaj-impl:1.5.2")
testImplementation("javax.xml.bind:jaxb-api:2.2.11")