From eef4301d5439f51a418d27a9509e4e3812e2f348 Mon Sep 17 00:00:00 2001 From: Dierk Koenig Date: Fri, 4 Sep 2015 15:30:17 +0200 Subject: travis has no gradle properties under home dir, so make that optional --- README.adoc | 2 +- build.gradle | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index c635ae0..09139e4 100644 --- a/README.adoc +++ b/README.adoc @@ -9,4 +9,4 @@ See https://plugins.gradle.org/plugin/org.frege-lang = Continuous Integration -The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-plugin/ . \ No newline at end of file +The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-pgitlugin/ . \ No newline at end of file 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 -- cgit