diff options
Diffstat (limited to 'templates/build.template')
-rw-r--r-- | templates/build.template | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/build.template b/templates/build.template index 3c0ffc8..1ab7ea2 100644 --- a/templates/build.template +++ b/templates/build.template @@ -39,9 +39,16 @@ application and should be checked into Version Control Systems. --> <loadproperties srcFile="project.properties" /> + <!-- if sdk.dir was not set from one of the property file, then + get it from the ANDROID_HOME env var. --> + <property environment="env" /> + <condition property="sdk.dir" value="${env.ANDROID_HOME}"> + <isset property="env.ANDROID_HOME" /> + </condition> + <!-- quick check on sdk.dir --> <fail - message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var" + message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable." unless="sdk.dir" /> |