diff --git a/build.gradle b/build.gradle index 4f490c8e7c19..c8727f8235b1 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ allprojects { } } - configurations.all { + configurations.configureEach { resolutionStrategy.cacheChangingModulesFor 0, "minutes" } } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index ccc689e54af8..cbd55b4506ce 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -71,7 +71,7 @@ dependencies { testRuntimeOnly("org.junit.platform:junit-platform-launcher") } -configurations.all { +configurations.configureEach { exclude group:"org.slf4j", module:"slf4j-api" exclude group:"ch.qos.logback", module:"logback-classic" exclude group:"ch.qos.logback", module:"logback-core" diff --git a/spring-boot-project/spring-boot-autoconfigure/build.gradle b/spring-boot-project/spring-boot-autoconfigure/build.gradle index 13ad7ba4cbd9..c7222d3870f7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure/build.gradle @@ -10,7 +10,7 @@ plugins { description = "Spring Boot AutoConfigure" -configurations.all { +configurations.configureEach { resolutionStrategy.eachDependency { DependencyResolveDetails details -> if (details.requested.module.group == "org.apache.kafka" && details.requested.module.name == "kafka-server-common") { details.artifactSelection { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle index 00da8c306455..8a4c2cc496a2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle @@ -17,7 +17,7 @@ repositories { maven { url 'repository' } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (it.requested.group == 'org.springframework.boot') { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle.kts b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle.kts index 168d758dd9f7..e038d56cc042 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle.kts +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/configure-platform.gradle.kts @@ -19,7 +19,7 @@ repositories { } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (requested.group == "org.springframework.boot") { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle index 5cb4d2f742db..b7fd414a3d2c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle @@ -12,7 +12,7 @@ repositories { maven { url 'repository' } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (it.requested.group == 'org.springframework.boot') { @@ -23,7 +23,7 @@ configurations.all { } // tag::custom-version[] -configurations.all { +configurations.configureEach { resolutionStrategy.eachDependency { DependencyResolveDetails details -> if (details.requested.group == 'org.slf4j') { details.useVersion '1.7.20' diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle.kts b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle.kts index 0a25ae948cbb..6b0bf99f8241 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle.kts +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora/modules/gradle-plugin/examples/managing-dependencies/custom-version-with-platform.gradle.kts @@ -14,7 +14,7 @@ repositories { } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (requested.group == "org.springframework.boot") { @@ -25,7 +25,7 @@ configurations.all { } // tag::custom-version[] -configurations.all { +configurations.configureEach { resolutionStrategy.eachDependency { if (requested.group == "org.slf4j") { useVersion("1.7.20") diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotDoesNotHaveDevelopmentOnlyDependenciesOnItsClasspath.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotDoesNotHaveDevelopmentOnlyDependenciesOnItsClasspath.gradle index f9cf4c70eb42..d13ad606c85e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotDoesNotHaveDevelopmentOnlyDependenciesOnItsClasspath.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotDoesNotHaveDevelopmentOnlyDependenciesOnItsClasspath.gradle @@ -10,7 +10,7 @@ repositories { maven { url 'repository' } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (it.requested.group == 'org.springframework.boot') { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasLibraryResourcesOnItsClasspath.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasLibraryResourcesOnItsClasspath.gradle index 95f4e824aef1..3354c9e5c86a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasLibraryResourcesOnItsClasspath.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasLibraryResourcesOnItsClasspath.gradle @@ -9,7 +9,7 @@ repositories { maven { url 'repository' } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (it.requested.group == 'org.springframework.boot') { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTestAndDevelopmentOnlyDependenciesOnItsClasspath.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTestAndDevelopmentOnlyDependenciesOnItsClasspath.gradle index abfe85dbb543..64f8fbfc2416 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTestAndDevelopmentOnlyDependenciesOnItsClasspath.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTestAndDevelopmentOnlyDependenciesOnItsClasspath.gradle @@ -10,7 +10,7 @@ repositories { maven { url 'repository' } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (it.requested.group == 'org.springframework.boot') { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTransitiveRuntimeDependenciesOnItsClasspath.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTransitiveRuntimeDependenciesOnItsClasspath.gradle index e704c3fdcba2..56b60f1f786d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTransitiveRuntimeDependenciesOnItsClasspath.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootAotPluginIntegrationTests-processTestAotHasTransitiveRuntimeDependenciesOnItsClasspath.gradle @@ -9,7 +9,7 @@ repositories { maven { url 'repository' } } -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if (it.requested.group == 'org.springframework.boot') { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle index 4b6c9a46edef..ffaff33e0e79 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle @@ -12,7 +12,7 @@ configurations { provided } -sourceSets.all { +sourceSets.configureEach { compileClasspath += configurations.provided runtimeClasspath += configurations.provided } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests-duplicatesAreHandledGracefully.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests-duplicatesAreHandledGracefully.gradle index 3b5c8323b0cb..b6fffd0bb427 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests-duplicatesAreHandledGracefully.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests-duplicatesAreHandledGracefully.gradle @@ -12,7 +12,7 @@ configurations { provided } -sourceSets.all { +sourceSets.configureEach { compileClasspath += configurations.provided runtimeClasspath += configurations.provided } diff --git a/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle b/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle index 39391bcef99c..4993f8eef76e 100644 --- a/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle +++ b/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle @@ -12,7 +12,7 @@ configurations { } } -configurations.all { +configurations.configureEach { exclude module: "spring-boot-starter-logging" } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/build.gradle index 7b9701752062..0305293ce371 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-log4j2/build.gradle @@ -5,7 +5,7 @@ plugins { description = "Spring Boot Actuator Log4j 2 smoke test" -configurations.all { +configurations.configureEach { exclude module: "spring-boot-starter-logging" } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/build.gradle index bb5d0fe2a4f9..40042f37e475 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-kafka/build.gradle @@ -6,7 +6,7 @@ plugins { description = "Spring Boot Kafka smoke test" -configurations.all { +configurations.configureEach { resolutionStrategy.eachDependency { DependencyResolveDetails details -> if (details.requested.module.group == "org.apache.kafka" && details.requested.module.name == "kafka-server-common") { details.artifactSelection { diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-structure-logging-log4j2/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-structure-logging-log4j2/build.gradle index b7e1a90ba789..6b991e88bfd5 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-structure-logging-log4j2/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-structure-logging-log4j2/build.gradle @@ -5,7 +5,7 @@ plugins { description = "Spring Boot structure logging Log4j2 smoke test" -configurations.all { +configurations.configureEach { exclude module: "spring-boot-starter-logging" }