aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.gradle8
1 files changed, 4 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle
index 2dfc439d7fc..4afdc28f758 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,8 +42,8 @@ allprojects {
def repository = project.hasProperty('cix') ? 'sonarsource-qa' : 'sonarsource'
maven {
url "https://repox.sonarsource.com/${repository}"
- def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: ARTIFACTORY_PRIVATE_USERNAME
- def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD' ?: ARTIFACTORY_PRIVATE_PASSWORD
+ def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: (project.hasProperty('artifactoryUsername') ? project.getProperty('artifactoryUsername') : '')
+ def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD' ?: (project.hasProperty('artifactoryPassword') ? project.getProperty('artifactoryPassword') : '')
if (artifactoryUsername && artifactoryPassword) {
credentials {
username artifactoryUsername
@@ -279,8 +279,8 @@ artifactory {
publish {
repository {
repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO')
- username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME')
- password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD')
+ username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME') ?: project.properties.artifactoryUsername
+ password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD') ?: project.properties.artifactoryPaswword
}
defaults {
properties = [