diff options
author | Josiah Gaskin <josiahgaskin@google.com> | 2011-06-07 16:06:06 -0700 |
---|---|---|
committer | Josiah Gaskin <josiahgaskin@google.com> | 2011-07-21 09:50:30 -0700 |
commit | c15b4fdc76142c61db1ec29feb2afdfaea43a84b (patch) | |
tree | 4368f73604d98f6e9e4d4a81b59e15488fc058f8 /anttasks/src/com | |
parent | bfeaebdae4372f7963776e9e9522bc9b3559fe23 (diff) | |
download | sdk-c15b4fdc76142c61db1ec29feb2afdfaea43a84b.zip sdk-c15b4fdc76142c61db1ec29feb2afdfaea43a84b.tar.gz sdk-c15b4fdc76142c61db1ec29feb2afdfaea43a84b.tar.bz2 |
Add support for aapt CrunchCache in ADT and Ant
This change lets ADT and Ant use the crunch cache system
set up in change I58271fb2. This commit is separate because
sdk and framework are separate git repositories.
Change-Id: If2828d157acad0b5adb812001e777c199e3c62fe
Diffstat (limited to 'anttasks/src/com')
-rw-r--r-- | anttasks/src/com/android/ant/AaptExecLoopTask.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/anttasks/src/com/android/ant/AaptExecLoopTask.java b/anttasks/src/com/android/ant/AaptExecLoopTask.java index aac61b1..6c98cbd 100644 --- a/anttasks/src/com/android/ant/AaptExecLoopTask.java +++ b/anttasks/src/com/android/ant/AaptExecLoopTask.java @@ -76,6 +76,7 @@ public final class AaptExecLoopTask extends BaseTask { private boolean mForce = true; // true due to legacy reasons private boolean mDebug = false; private boolean mVerbose = false; + private boolean mUseCrunchCache = false; private int mVersionCode = 0; private String mManifest; private ArrayList<Path> mResources; @@ -119,6 +120,14 @@ public final class AaptExecLoopTask extends BaseTask { mVerbose = verbose; } + /** + * Sets the value of the "usecrunchcache" attribute + * @param usecrunch whether to use the crunch cache. + */ + public void setNoCrunch(boolean nocrunch) { + mUseCrunchCache = nocrunch; + } + public void setVersioncode(String versionCode) { if (versionCode.length() > 0) { try { @@ -346,6 +355,11 @@ public final class AaptExecLoopTask extends BaseTask { // aapt command. Only "package" is supported at this time really. task.createArg().setValue(mCommand); + // No crunch flag + if (mUseCrunchCache) { + task.createArg().setValue("--no-crunch"); + } + // force flag if (mForce) { task.createArg().setValue("-f"); |