diff options
author | Xavier Ducrohet <xav@android.com> | 2012-02-14 14:16:33 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-02-14 14:16:33 -0800 |
commit | 1dd5c94cbf810129c74213f5ba857265410d736d (patch) | |
tree | 83d54f116f3f5016e2a314b71ca138859a07c42c /anttasks/src/com/android/ant/NewSetupTask.java | |
parent | 90e5a71934ae349aca32845f50909310ae6ec484 (diff) | |
download | sdk-1dd5c94cbf810129c74213f5ba857265410d736d.zip sdk-1dd5c94cbf810129c74213f5ba857265410d736d.tar.gz sdk-1dd5c94cbf810129c74213f5ba857265410d736d.tar.bz2 |
Fix ant issue where annotations.jar causes problems.
Change-Id: Id08c9d187c75ff0e8e6998ef85204f28cf1ed252
Diffstat (limited to 'anttasks/src/com/android/ant/NewSetupTask.java')
-rw-r--r-- | anttasks/src/com/android/ant/NewSetupTask.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/anttasks/src/com/android/ant/NewSetupTask.java b/anttasks/src/com/android/ant/NewSetupTask.java index b8765da..f3fd9aa 100644 --- a/anttasks/src/com/android/ant/NewSetupTask.java +++ b/anttasks/src/com/android/ant/NewSetupTask.java @@ -528,6 +528,8 @@ public class NewSetupTask extends Task { System.out.println("------------------\n"); + boolean hasLibraries = jarsPath.list().length > 0; + if (androidTarget.getVersion().getApiLevel() <= 15) { System.out.println("API<=15: Adding annotations.jar to the classpath.\n"); @@ -545,7 +547,7 @@ public class NewSetupTask extends Task { antProject.addReference(mProjectLibrariesLibsOut, libsPath); // the rest is done only if there's a library. - if (jarsPath.list().length > 0) { + if (hasLibraries) { antProject.addReference(mProjectLibrariesRootOut, rootPath); antProject.addReference(mProjectLibrariesResOut, resPath); antProject.setProperty(mProjectLibrariesPackageOut, packageStrBuilder.toString()); |