Update ant's build.xml to support the build-tools SDK component.

Change-Id: I3c36dcb71dc36b930b33c74a959f2a5e43419905
diff --git a/files/ant/build.xml b/files/ant/build.xml
index efe6b7d..b50363a 100644
--- a/files/ant/build.xml
+++ b/files/ant/build.xml
@@ -154,18 +154,8 @@
     <condition property="bat" value=".bat" else=""><os family="windows" /></condition>
     <property name="adb" location="${android.platform.tools.dir}/adb${exe}" />
     <property name="zipalign" location="${android.tools.dir}/zipalign${exe}" />
-    <property name="aidl" location="${android.platform.tools.dir}/aidl${exe}" />
-    <property name="aapt" location="${android.platform.tools.dir}/aapt${exe}" />
-    <property name="dx" location="${android.platform.tools.dir}/dx${bat}" />
-    <property name="renderscript" location="${android.platform.tools.dir}/llvm-rs-cc${exe}"/>
     <property name="lint" location="${android.tools.dir}/lint${bat}" />
 
-    <!-- Renderscript include Path -->
-    <path id="android.renderscript.include.path">
-        <pathelement location="${android.platform.tools.dir}/renderscript/include" />
-        <pathelement location="${android.platform.tools.dir}/renderscript/clang-include" />
-    </path>
-
     <!-- Intermediate files -->
     <property name="dex.file.name" value="classes.dex" />
     <property name="intermediate.dex.file" location="${out.absolute.dir}/${dex.file.name}" />
@@ -484,6 +474,18 @@
 
     <!-- Pre build setup -->
     <target name="-build-setup" depends="-setup">
+        <!-- find location of build tools -->
+        <getbuildtools name="android.build.tools.dir" />
+        <property name="aidl" location="${android.build.tools.dir}/aidl${exe}" />
+        <property name="aapt" location="${android.build.tools.dir}/aapt${exe}" />
+        <property name="dx" location="${android.build.tools.dir}/dx${bat}" />
+        <property name="renderscript" location="${android.build.tools.dir}/llvm-rs-cc${exe}"/>
+
+        <!-- Renderscript include Path -->
+        <path id="android.renderscript.include.path">
+            <pathelement location="${android.platform.tools.dir}/renderscript/include" />
+            <pathelement location="${android.platform.tools.dir}/renderscript/clang-include" />
+        </path>
 
         <!-- read the previous build mode -->
         <property file="${out.build.prop.file}" />
diff --git a/files/ant/uibuild.xml b/files/ant/uibuild.xml
index 93782ba..788ca77 100644
--- a/files/ant/uibuild.xml
+++ b/files/ant/uibuild.xml
@@ -94,7 +94,6 @@
     <condition property="exe" value=".exe" else=""><os family="windows" /></condition>
     <condition property="bat" value=".bat" else=""><os family="windows" /></condition>
     <property name="adb" location="${android.platform.tools.dir}/adb${exe}" />
-    <property name="dx" location="${android.platform.tools.dir}/dx${bat}" />
 
     <!-- Intermediate files -->
     <property name="dex.file.name" value="classes.dex" />
@@ -153,6 +152,8 @@
 
     <!-- Pre build setup -->
     <target name="-build-setup" depends="-check-env">
+        <getbuildtools name="android.build.tools.dir" />
+        <property name="dx" location="${android.build.tools.dir}/dx${bat}" />
 
         <echo level="info">Resolving Build Target for ${ant.project.name}...</echo>
         <!-- load project properties, resolve Android target, library dependencies