aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-03-29 19:28:25 -0700
committerXavier Ducrohet <xav@android.com>2012-04-16 12:54:55 -0700
commit1daa8f999d87443d14f698ca8ccc103e3309fa3e (patch)
tree29f034c67acbecc4933e35a46484edf1f9c9d055 /templates
parent4a8a17e5f23eace570b54084318b30bdd593fbc0 (diff)
downloadsdk-1daa8f999d87443d14f698ca8ccc103e3309fa3e.zip
sdk-1daa8f999d87443d14f698ca8ccc103e3309fa3e.tar.gz
sdk-1daa8f999d87443d14f698ca8ccc103e3309fa3e.tar.bz2
Fix "ant test" + misc clean up / reorganization of build.xml
- Split NewSetupTask in several tasks to make things more flexible. Particularly this allows more targets to get access to the project type (app, lib, test, ...) as it's not so computive intensive. - Fix test project to give them access to the full tested project's classpath. - Fix support for projects that test themselves. - Make sure library projects are instrumented when using the emma target. Change-Id: Ia0c9564eacee2521e7cbd5154b8a85ea287ad4fd
Diffstat (limited to 'templates')
-rw-r--r--templates/build.template9
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"
/>