diff options
author | Ficus Kirkpatrick <ficus@android.com> | 2010-08-13 14:13:08 -0700 |
---|---|---|
committer | Ficus Kirkpatrick <ficus@android.com> | 2010-08-13 14:20:51 -0700 |
commit | 588f228d6a3e3b254fbc1f13f29ee47e13a669c1 (patch) | |
tree | 22db4977d6e71d3148f475eefcccbb16003be7ed /tools/aapt/Main.cpp | |
parent | 876247784ee6202066abdefd8366f2e09e681fab (diff) |
Add --max-res-version flag to aapt.
aapt will ignore any versioned resource directories over the
specified version (if used). e.g. --max-res-version=6 will
cause layout-land-v7 to be ignored.
Merged from froyo.
Change-Id: Ia4eabae535b95b75d18b0c83135d44ed9a95b9eb
Diffstat (limited to 'tools/aapt/Main.cpp')
-rw-r--r-- | tools/aapt/Main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index b0c6e3975b51..f457cc8b3323 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -62,6 +62,7 @@ void usage(void) " [--rename-manifest-package PACKAGE] \\\n" " [--rename-instrumentation-target-package PACKAGE] \\\n" " [--utf16] [--auto-add-overlay] \\\n" + " [--max-res-version VAL] \\\n" " [-I base-package [-I base-package ...]] \\\n" " [-A asset-source-dir] [-G class-list-file] [-P public-definitions-file] \\\n" " [-S resource-sources [-S resource-sources ...]] " @@ -128,6 +129,8 @@ void usage(void) " higher, the default encoding for resources will be in UTF-8.\n" " --target-sdk-version\n" " inserts android:targetSdkVersion in to manifest.\n" + " --max-res-version\n" + " ignores versioned resource directories above the given value.\n" " --values\n" " when used with \"dump resources\" also includes resource values.\n" " --version-code\n" @@ -416,6 +419,15 @@ int main(int argc, char* const argv[]) goto bail; } bundle.setMaxSdkVersion(argv[0]); + } else if (strcmp(cp, "-max-res-version") == 0) { + argc--; + argv++; + if (!argc) { + fprintf(stderr, "ERROR: No argument supplied for '--max-res-version' option\n"); + wantUsage = true; + goto bail; + } + bundle.setMaxResVersion(argv[0]); } else if (strcmp(cp, "-version-code") == 0) { argc--; argv++; |