diff options
author | Xavier Ducrohet <xav@android.com> | 2012-06-22 17:05:53 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-06-22 17:40:42 -0700 |
commit | 1ad2af8eb043d1b6c600a9487ae5130e567104d7 (patch) | |
tree | 73dff012d7600b3ba718b65b896b893446a0d308 /anttasks | |
parent | 84354bac6f41b89e1094a529a12dc6a2c5330a4e (diff) | |
download | sdk-1ad2af8eb043d1b6c600a9487ae5130e567104d7.zip sdk-1ad2af8eb043d1b6c600a9487ae5130e567104d7.tar.gz sdk-1ad2af8eb043d1b6c600a9487ae5130e567104d7.tar.bz2 |
Fix Ant task for 1.8.3 which seems more strict than 1.8.2
Change-Id: Id88bc5d12d007c4c94ca11b7eddfc911fbd7bddb
Diffstat (limited to 'anttasks')
-rw-r--r-- | anttasks/src/com/android/ant/GetLibraryPathTask.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/anttasks/src/com/android/ant/GetLibraryPathTask.java b/anttasks/src/com/android/ant/GetLibraryPathTask.java index a79f6e3..813574e 100644 --- a/anttasks/src/com/android/ant/GetLibraryPathTask.java +++ b/anttasks/src/com/android/ant/GetLibraryPathTask.java @@ -83,7 +83,7 @@ public class GetLibraryPathTask extends Task { element.setPath(sb.toString()); } - public Path getPath() { + @NonNull public Path getPath() { return mPath; } } @@ -175,6 +175,8 @@ public class GetLibraryPathTask extends Task { System.out.println("Library dependencies:"); + Path path = new Path(antProject); + if (helper.getLibraryCount() > 0) { System.out.println("\n------------------\nOrdered libraries:"); @@ -182,27 +184,25 @@ public class GetLibraryPathTask extends Task { if (mLibraryFolderPathOut != null) { if (mLeaf == null) { - // Create a Path object of all the libraries in reverse order. + // Fill a Path object with all the libraries in reverse order. // This is important so that compilation of libraries happens // in the reverse order. - Path rootPath = new Path(antProject); - List<File> libraries = helper.getLibraries(); for (int i = libraries.size() - 1 ; i >= 0; i--) { File library = libraries.get(i); - PathElement element = rootPath.createPathElement(); + PathElement element = path.createPathElement(); element.setPath(library.getAbsolutePath()); } - antProject.addReference(mLibraryFolderPathOut, rootPath); } else { - antProject.addReference(mLibraryFolderPathOut, - ((LeafProcessor) processor).getPath()); + path = ((LeafProcessor) processor).getPath(); } } } else { System.out.println("No Libraries"); } + + antProject.addReference(mLibraryFolderPathOut, path); } } |