From 34306fd3a002409a4acc52184892a53f28ee0131 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Tue, 24 Sep 2019 20:42:44 +0200 Subject: [PATCH] Fix Gradle dependency caching configuration See: #1505 --- build.gradle | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 8ca12e64..5634fa99 100644 --- a/build.gradle +++ b/build.gradle @@ -23,21 +23,29 @@ apply plugin: 'io.spring.convention.root' group = 'org.springframework.session' description = 'Spring Session' -configurations.all { - resolutionStrategy { - cacheChangingModulesFor 0, "seconds" - cacheDynamicVersionsFor 0, "seconds" - } -} - subprojects { apply plugin: 'io.spring.javaformat' - plugins.withType(JavaPlugin) { - sourceCompatibility = JavaVersion.VERSION_1_8 - - tasks.withType(Test) { - useJUnitPlatform() + configurations.all { + resolutionStrategy { + cacheChangingModulesFor 0, "seconds" + cacheDynamicVersionsFor 0, "seconds" } } + + plugins.withType(JavaPlugin) { + sourceCompatibility = JavaVersion.VERSION_1_8 + } + + plugins.withId('io.spring.dependency-management') { + dependencyManagement { + resolutionStrategy { + cacheChangingModulesFor 0, "seconds" + } + } + } + + tasks.withType(Test) { + useJUnitPlatform() + } }