aboutsummaryrefslogtreecommitdiffstats
path: root/anttasks
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-10-12 18:13:18 -0700
committerXavier Ducrohet <xav@android.com>2010-10-13 10:38:44 -0700
commit6e8566df26c3a3b89194c4e19b330b057b060a2c (patch)
tree2611a1c525d8e5d13350b7d9e66500fe75c2861c /anttasks
parent89f2e38fa3fd0cf5599d6c1bd20c025e652ec87d (diff)
downloadsdk-6e8566df26c3a3b89194c4e19b330b057b060a2c.zip
sdk-6e8566df26c3a3b89194c4e19b330b057b060a2c.tar.gz
sdk-6e8566df26c3a3b89194c4e19b330b057b060a2c.tar.bz2
Check for platform-tools presence.
Change-Id: Ieaf6e42bc67829b01ebb0fa799bc615f85fc1a6d
Diffstat (limited to 'anttasks')
-rw-r--r--anttasks/src/com/android/ant/SetupTask.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/anttasks/src/com/android/ant/SetupTask.java b/anttasks/src/com/android/ant/SetupTask.java
index ba62403..4f14d62 100644
--- a/anttasks/src/com/android/ant/SetupTask.java
+++ b/anttasks/src/com/android/ant/SetupTask.java
@@ -92,6 +92,17 @@ public final class SetupTask extends ImportTask {
System.out.println("Android SDK Tools Revision " + toolsRevison);
}
+ // detect that the platform tools is there.
+ File platformTools = new File(sdkDir, SdkConstants.FD_PLATFORM_TOOLS);
+ if (platformTools.isDirectory() == false) {
+ throw new BuildException(String.format(
+ "SDK Platform Tools component is missing. " +
+ "Please install it with the SDK Manager (%1$s%2$c%3$s)",
+ SdkConstants.FD_TOOLS,
+ File.separatorChar,
+ SdkConstants.androidCmdName()));
+ }
+
// get the target property value
String targetHashString = antProject.getProperty(ProjectProperties.PROPERTY_TARGET);