summaryrefslogtreecommitdiffstats
path: root/apkbuilder
diff options
context:
space:
mode:
authorPiotr Gurgul <pgurgul@google.com>2009-09-21 21:02:00 -0700
committerPiotr Gurgul <pgurgul@google.com>2009-09-22 11:28:43 -0700
commitca8bc1bbb0def3848d75dca098776c0885170b80 (patch)
tree38fd6dd8aa85085406c5561f1177557eac0d2986 /apkbuilder
parent567e604060b9150212e8dc1570ae762bac269ac3 (diff)
downloadreplicant_sdk-ca8bc1bbb0def3848d75dca098776c0885170b80.zip
replicant_sdk-ca8bc1bbb0def3848d75dca098776c0885170b80.tar.gz
replicant_sdk-ca8bc1bbb0def3848d75dca098776c0885170b80.tar.bz2
Distinguish jar folders and jar files in ApkBuilder script
Checking if -rj parameter value is a directory or a file and calling the appropriate function for each of them.
Diffstat (limited to 'apkbuilder')
-rw-r--r--apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java b/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java
index 81cbc1c..9d21c22 100644
--- a/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java
+++ b/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java
@@ -133,7 +133,12 @@ public final class ApkBuilderImpl {
throw new WrongOptionException("Missing value for -rj");
}
- processJarFolder(args[index++], resourcesJars);
+ File f = new File(args[index]);
+ if (f.isDirectory()) {
+ processJarFolder(args[index++], resourcesJars);
+ } else if (f.isFile()) {
+ processJarFile(args[index++], resourcesJars);
+ }
} else if ("-nf".equals(argument)) {
// quick check on the next argument.
if (index == args.length) {