From 7a24b0a506e489361bf11416d63b4976e4733786 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 29 Oct 2019 23:28:16 +0000 Subject: [PATCH] JAL-3210 Now add/override gradle.properties with local.properties --- .gitignore | 1 + build.gradle | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) 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 -- 1.7.10.2