diff options
author | Xavier Ducrohet <xav@android.com> | 2012-07-09 12:22:13 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-07-09 12:22:13 -0700 |
commit | ac7efd7e9f6f9a9fd76afaa774f26ad76602c25a (patch) | |
tree | d09121f81f5d90537774f0ab8ec2d48291a08c59 /anttasks/src/com/android/ant/CheckEnvTask.java | |
parent | 0d8f973905a4925e00eb9e32887c192b2148b29f (diff) | |
download | sdk-ac7efd7e9f6f9a9fd76afaa774f26ad76602c25a.zip sdk-ac7efd7e9f6f9a9fd76afaa774f26ad76602c25a.tar.gz sdk-ac7efd7e9f6f9a9fd76afaa774f26ad76602c25a.tar.bz2 |
Fix parsing SDK Tools in ant tasks.
Change-Id: Id1db4d2fc318b9318fcd0b7cb204f7ffe0d8429e
Diffstat (limited to 'anttasks/src/com/android/ant/CheckEnvTask.java')
-rw-r--r-- | anttasks/src/com/android/ant/CheckEnvTask.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/anttasks/src/com/android/ant/CheckEnvTask.java b/anttasks/src/com/android/ant/CheckEnvTask.java index d6b6cc4..e8e1a89 100644 --- a/anttasks/src/com/android/ant/CheckEnvTask.java +++ b/anttasks/src/com/android/ant/CheckEnvTask.java @@ -42,7 +42,7 @@ public class CheckEnvTask extends Task { Project antProject = getProject(); // check the Ant version - DeweyDecimal version = getVersion(antProject); + DeweyDecimal version = getAntVersion(antProject); DeweyDecimal atLeast = new DeweyDecimal(ANT_MIN_VERSION); if (atLeast.isGreaterThan(version)) { throw new BuildException( @@ -67,8 +67,8 @@ public class CheckEnvTask extends Task { } // display SDK Tools revision - int toolsRevison = TaskHelper.getToolsRevision(sdkDir); - if (toolsRevison != -1) { + DeweyDecimal toolsRevison = TaskHelper.getToolsRevision(sdkDir); + if (toolsRevison != null) { System.out.println("Android SDK Tools Revision " + toolsRevison); System.out.println("Installed at " + sdkDir.getAbsolutePath()); } @@ -83,7 +83,7 @@ public class CheckEnvTask extends Task { * @param antProject the current ant project. * @return the ant version. */ - private DeweyDecimal getVersion(Project antProject) { + private DeweyDecimal getAntVersion(Project antProject) { char[] versionString = antProject.getProperty("ant.version").toCharArray(); StringBuilder sb = new StringBuilder(); boolean foundFirstDigit = false; |