Commit 820c671d authored by Andy Wilkinson's avatar Andy Wilkinson

Configure repositories based on the version that is being built

https://repo.spring.io/snapshot should only be available when
building a BUILD-SNAPSHOT. https://repo.spring.io/milestone should
only be available when not building a RELEASE (a BUILD-SNAPSHOT, Mn,
or RCn).

Closes gh-19700
parent 01a0a54f
...@@ -9,9 +9,13 @@ allprojects { ...@@ -9,9 +9,13 @@ allprojects {
repositories { repositories {
mavenCentral() mavenCentral()
if (!version.endsWith('RELEASE')) {
maven { url "https://repo.spring.io/milestone" } maven { url "https://repo.spring.io/milestone" }
}
if (version.endsWith('BUILD-SNAPSHOT')) {
maven { url "https://repo.spring.io/snapshot" } maven { url "https://repo.spring.io/snapshot" }
} }
}
configurations.all { configurations.all {
resolutionStrategy.cacheChangingModulesFor 60, "minutes" resolutionStrategy.cacheChangingModulesFor 60, "minutes"
......
...@@ -2,8 +2,10 @@ pluginManagement { ...@@ -2,8 +2,10 @@ pluginManagement {
repositories { repositories {
mavenCentral() mavenCentral()
gradlePluginPortal() gradlePluginPortal()
if (version.endsWith('BUILD-SNAPSHOT')) {
maven { url "https://repo.spring.io/snapshot" } maven { url "https://repo.spring.io/snapshot" }
} }
}
resolutionStrategy { resolutionStrategy {
eachPlugin { eachPlugin {
if (requested.id.id == "org.jetbrains.kotlin.jvm") { if (requested.id.id == "org.jetbrains.kotlin.jvm") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment