Add artifactoryUsername/Password

This commit is contained in:
Rob Winch
2020-11-17 14:16:05 -06:00
parent 142496c4c4
commit ac4c90f63a

View File

@@ -1,6 +1,14 @@
buildscript {
repositories {
maven { url 'https://repo.spring.io/plugins-release' }
maven {
url = 'https://repo.spring.io/plugins-release'
if (project.hasProperty('artifactoryUsername')) {
credentials {
username "$artifactoryUsername"
password "$artifactoryPassword"
}
}
}
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:0.17.0"
@@ -226,3 +234,20 @@ artifacts {
archives distZip
archives schemaZip
}
if (project.hasProperty('artifactoryUsername')) {
allprojects { project ->
project.repositories { repos ->
all { repo ->
if (!repo.url.toString().startsWith("https://repo.spring.io/")) {
return;
}
repo.credentials {
username = artifactoryUsername
password = artifactoryPassword
}
}
}
}
}