diff options
Diffstat (limited to 'templates/build.template')
-rw-r--r-- | templates/build.template | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/templates/build.template b/templates/build.template index 1ab7ea2..aea57a2 100644 --- a/templates/build.template +++ b/templates/build.template @@ -28,6 +28,15 @@ --> <property file="ant.properties" /> + <!-- if sdk.dir was not set from one of the property file, then + get it from the ANDROID_HOME env var. + This must be done before we load project.properties since + the proguard config can use sdk.dir --> + <property environment="env" /> + <condition property="sdk.dir" value="${env.ANDROID_HOME}"> + <isset property="env.ANDROID_HOME" /> + </condition> + <!-- The project.properties file is created and updated by the 'android' tool, as well as ADT. @@ -39,13 +48,6 @@ 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 the ANDROID_HOME environment variable." |