diff --git a/build.gradle b/build.gradle index 3abde44406..1e8b94cf9b 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,12 @@ allprojects { repositories { mavenCentral() - maven { url "https://repo.spring.io/milestone" } - maven { url "https://repo.spring.io/snapshot" } + if (!version.endsWith('RELEASE')) { + maven { url "https://repo.spring.io/milestone" } + } + if (version.endsWith('BUILD-SNAPSHOT')) { + maven { url "https://repo.spring.io/snapshot" } + } } configurations.all { diff --git a/settings.gradle b/settings.gradle index ab3c1f67cf..5671c837f1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,7 +2,9 @@ pluginManagement { repositories { mavenCentral() gradlePluginPortal() - maven { url "https://repo.spring.io/snapshot" } + if (version.endsWith('BUILD-SNAPSHOT')) { + maven { url "https://repo.spring.io/snapshot" } + } } resolutionStrategy { eachPlugin {