From: Ben Soares Date: Tue, 29 Oct 2019 23:28:16 +0000 (+0000) Subject: JAL-3210 Now add/override gradle.properties with local.properties X-Git-Tag: Release_2_11_4_0~45^2~18^2~91 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7a24b0a506e489361bf11416d63b4976e4733786;p=jalview.git JAL-3210 Now add/override gradle.properties with local.properties --- diff --git a/.gitignore b/.gitignore index c30231b..f313551 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ TESTNG /site /.gradle /build +/local.properties /utils/HelpLinksChecker.touch /getdown/website /getdown/full_app diff --git a/build.gradle b/build.gradle index c9b1332..535efc8 100644 --- a/build.gradle +++ b/build.gradle @@ -53,6 +53,22 @@ def compile_source_compatibility def compile_target_compatibility ext { + // local build environment properties + def localProps = "${jalviewDir}/local.properties" + if (file(localProps).exists()) { + def p = new Properties() + def localPropsFIS = new FileInputStream(localProps) + p.load(localPropsFIS) + localPropsFIS.close() + p.each { + key, val -> + def over = project.properties.get(key) != null + project.properties.put(key, val) + if (over) { + println("Overriding property '${key}' with local.properties value") + } + } + } getdownWebsiteDir = "${jalviewDir}/${getdown_website_dir}/${JAVA_VERSION}" getdownDir = "" reportRsyncCmd = false