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
pull/19880/head
Andy Wilkinson 5 years ago
parent 01a0a54f78
commit 820c671ddd

@ -9,9 +9,13 @@ allprojects {
repositories {
mavenCentral()
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 {
resolutionStrategy.cacheChangingModulesFor 60, "minutes"

@ -2,8 +2,10 @@ pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
if (version.endsWith('BUILD-SNAPSHOT')) {
maven { url "https://repo.spring.io/snapshot" }
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "org.jetbrains.kotlin.jvm") {

Loading…
Cancel
Save