aboutsummaryrefslogtreecommitdiff
path: root/gradle
diff options
context:
space:
mode:
authorCedric Beust <cedric@beust.com>2015-05-25 22:01:11 -0700
committerCedric Beust <cedric@beust.com>2015-05-25 22:01:11 -0700
commit29fe72fdd875a57dab0cccb099b0165917853749 (patch)
tree45b39a263791873fdcd411eed60f66d4d946b998 /gradle
parent963e0d85d3abd9024b5d584ece1d65579e28cccb (diff)
downloadtestng-29fe72fdd875a57dab0cccb099b0165917853749.tar.gz
Fix travis build with environment variables.
Diffstat (limited to 'gradle')
-rw-r--r--gradle/publishing.gradle17
1 files changed, 11 insertions, 6 deletions
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
index ee74bb25..e76f873a 100644
--- a/gradle/publishing.gradle
+++ b/gradle/publishing.gradle
@@ -123,25 +123,30 @@ allprojects {
}
artifactory {
- contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver
+ def a_user = hasProperty('artifactory_user') ? artifactory_user : System.getenv('artifactory_user')
+ def a_password = hasProperty('artifactory_password') ? artifactory_password : System.getenv('artifactory_password')
+ def a_contextUrl = hasProperty('artifactory_contextUrl') ? artifactory_password : System.getenv('artifactory_contextUrl')
+
+ contextUrl = "${a_contextUrl}"
+ //The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
repoKey = 'oss-snapshot-local'
- username = "${artifactory_user}"
- password = "${artifactory_password}"
+ username = "${a_user}"
+ password = "${a_password}"
maven = true
}
defaults {
- publications ('mavenJava')
+ publications('mavenJava')
}
}
resolve {
repository {
repoKey = 'libs-snapshot'
- username = "${artifactory_user}"
- password = "${artifactory_password}"
+ username = "${a_user}"
+ password = "${a_password}"
maven = true
}