aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorDierk Koenig <dierk.koenig@canoo.com>2015-09-04 15:30:17 +0200
committerDierk Koenig <dierk.koenig@canoo.com>2015-09-04 15:30:17 +0200
commiteef4301d5439f51a418d27a9509e4e3812e2f348 (patch)
tree3d154d354c21e4e741d7b51b6ac0903d55e16b86 /build.gradle
parentc8fbd2d175d11193b70a8da79ee399da5849104f (diff)
downloadfrege-gradle-plugin-eef4301d5439f51a418d27a9509e4e3812e2f348.tar.gz
frege-gradle-plugin-eef4301d5439f51a418d27a9509e4e3812e2f348.tar.bz2
frege-gradle-plugin-eef4301d5439f51a418d27a9509e4e3812e2f348.zip
travis has no gradle properties under home dir, so make that optional
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle14
1 files changed, 8 insertions, 6 deletions
diff --git a/build.gradle b/build.gradle
index bcf47c5..0e5f6ad 100644
--- a/build.gradle
+++ b/build.gradle
@@ -18,12 +18,14 @@ ext {
// work around https://issues.gradle.org/browse/GRADLE-3281
def home = new File(System.getProperty("user.home"))
def propfile = new File(home, ".gradle/gradle.properties")
- props = new Properties()
- propfile.withReader {
- props.load(it)
- System.setProperty "gradle.publish.key" , props.'gradle.publish.key'
- System.setProperty "gradle.publish.secret", props.'gradle.publish.secret'
- }
+ if (propfile.exists()) {
+ props = new Properties()
+ propfile.withReader {
+ props.load(it)
+ System.setProperty "gradle.publish.key", props.'gradle.publish.key'
+ System.setProperty "gradle.publish.secret", props.'gradle.publish.secret'
+ }
+ } else println "cannot find '$propfile.absolutePath'"
}
version = projectVersion