Configure spring repos conditionally

- Depending on a build, use milestone and/or snapshot repos
- Relates #1122
This commit is contained in:
Janne Valkealahti
2023-11-13 13:15:37 +00:00
parent 27dbddebae
commit 1c974ac3f9
2 changed files with 12 additions and 3 deletions

View File

@@ -82,9 +82,12 @@ configure(javaProjectsAndRoot) {
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/libs-snapshot' }
maven { url 'https://repo.spring.io/libs-release' }
maven { url 'https://repo.spring.io/libs-milestone' }
if (version.contains('-')) {
maven { url "https://repo.spring.io/milestone" }
}
if (version.endsWith('-SNAPSHOT')) {
maven { url "https://repo.spring.io/snapshot" }
}
}
configurations {

View File

@@ -2,6 +2,12 @@ pluginManagement {
repositories {
gradlePluginPortal()
maven { url 'https://repo.spring.io/release' }
if (version.contains('-')) {
maven { url 'https://repo.spring.io/milestone' }
}
if (version.endsWith('-SNAPSHOT')) {
maven { url 'https://repo.spring.io/snapshot' }
}
}
}