From ca8bc1bbb0def3848d75dca098776c0885170b80 Mon Sep 17 00:00:00 2001 From: Piotr Gurgul Date: Mon, 21 Sep 2009 21:02:00 -0700 Subject: 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. --- apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apkbuilder') 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) { -- cgit v1.1