From 70bb30ba0c3e33bae340e75f7e80ed2420d9f95c Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Wed, 20 Sep 2017 16:52:20 -0400 Subject: [PATCH] Skip masterpassword-android if not set up to build it. --- gradle/settings.gradle | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gradle/settings.gradle b/gradle/settings.gradle index a56506d2..70853cbd 100644 --- a/gradle/settings.gradle +++ b/gradle/settings.gradle @@ -1,5 +1,8 @@ rootProject.name = 'masterpassword' +def local = new Properties(); +local.load(file('local.properties').newDataInputStream()) + include 'masterpassword-algorithm' project(':masterpassword-algorithm').projectDir = new File( '../core/java/algorithm' ) @@ -12,5 +15,9 @@ project(':masterpassword-tests').projectDir = new File( '../core/java/tests' ) include 'masterpassword-gui' project(':masterpassword-gui').projectDir = new File( '../platform-independent/gui-java' ) -include 'masterpassword-android' -project(':masterpassword-android').projectDir = new File( '../platform-android' ) +if (local.containsKey('sdk.dir')) { + include 'masterpassword-android' + project(':masterpassword-android').projectDir = new File( '../platform-android' ) +} else { + logger.warn( "Skipping masterpassword-android since sdk.dir is not defined in local.properties." ) +}