Create extension to configure Spring maven repositories
Create a small Groovy script that can be used in `settings.gradle` files to extend `repositories` to support the various maven repositories required for our build. See gh-42333
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
pluginManagement {
|
||||
new File(rootDir.parentFile, "gradle.properties").withInputStream {
|
||||
def properties = new Properties()
|
||||
properties.load(it)
|
||||
properties.forEach(settings.ext::set)
|
||||
gradle.rootProject {
|
||||
properties.forEach(project.ext::set)
|
||||
}
|
||||
}
|
||||
evaluate(new File("${rootDir}/SpringRepositorySupport.groovy")).apply(this)
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
gradle.rootProject((project) -> {
|
||||
new File(rootDir.parentFile, "gradle.properties").withInputStream {
|
||||
def properties = new Properties()
|
||||
properties.load(it)
|
||||
properties.forEach(project.ext::set)
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user