Skip to content

Commit 820c671

Browse files
committed
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
1 parent 01a0a54 commit 820c671

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ allprojects {
99

1010
repositories {
1111
mavenCentral()
12-
maven { url "https://repo.spring.io/milestone" }
13-
maven { url "https://repo.spring.io/snapshot" }
12+
if (!version.endsWith('RELEASE')) {
13+
maven { url "https://repo.spring.io/milestone" }
14+
}
15+
if (version.endsWith('BUILD-SNAPSHOT')) {
16+
maven { url "https://repo.spring.io/snapshot" }
17+
}
1418
}
1519

1620
configurations.all {

settings.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ pluginManagement {
22
repositories {
33
mavenCentral()
44
gradlePluginPortal()
5-
maven { url "https://repo.spring.io/snapshot" }
5+
if (version.endsWith('BUILD-SNAPSHOT')) {
6+
maven { url "https://repo.spring.io/snapshot" }
7+
}
68
}
79
resolutionStrategy {
810
eachPlugin {

0 commit comments

Comments
 (0)