diff options
author | Xavier Ducrohet <xav@android.com> | 2012-03-01 18:02:19 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-03-01 18:05:17 -0800 |
commit | 314a75226677df8933fd38824e9510acde90fe87 (patch) | |
tree | 456ad99f91b1b1ee5cb421ed6e51019fa5c32dc2 /anttasks/src | |
parent | 8e700cd45398cabff12e16ee535d02933c0d3220 (diff) | |
download | sdk-314a75226677df8933fd38824e9510acde90fe87.zip sdk-314a75226677df8933fd38824e9510acde90fe87.tar.gz sdk-314a75226677df8933fd38824e9510acde90fe87.tar.bz2 |
Only generate the libraries R/manifest classes in the app project.
If the project is a library itself then there's no need to generate
them.
Change-Id: I9896e2bac81979797cca10fc606c66e5139fc9a1
Diffstat (limited to 'anttasks/src')
-rw-r--r-- | anttasks/src/com/android/ant/AaptExecTask.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/anttasks/src/com/android/ant/AaptExecTask.java b/anttasks/src/com/android/ant/AaptExecTask.java index 547e945..eabbbd2 100644 --- a/anttasks/src/com/android/ant/AaptExecTask.java +++ b/anttasks/src/com/android/ant/AaptExecTask.java @@ -218,7 +218,7 @@ public final class AaptExecTask extends SingleDependencyTask { * The manifest will be rewritten so that its package ID becomes the value given here. * Relative class names in the manifest (e.g. ".Foo") will be rewritten to absolute names based * on the existing package name, meaning that no code changes need to be made. - * + * * @param packageName The package ID the APK should have. */ public void setManifestpackage(String packageName) { @@ -356,8 +356,9 @@ public final class AaptExecTask extends SingleDependencyTask { String libPkgProp = null; // if the parameters indicate generation of the R class, check if - // more R classes need to be created for libraries. - if (mRFolder != null && new File(mRFolder).isDirectory()) { + // more R classes need to be created for libraries, only if this project itself + // is not a library + if (mNonConstantId == false && mRFolder != null && new File(mRFolder).isDirectory()) { libPkgProp = taskProject.getProperty(mProjectLibrariesPackageName); if (libPkgProp != null) { // Replace ";" with ":" since that's what aapt expects @@ -527,7 +528,7 @@ public final class AaptExecTask extends SingleDependencyTask { } } - if (extraPackages != null && extraPackages.length() > 0) { + if (mNonConstantId == false && extraPackages != null && extraPackages.length() > 0) { task.createArg().setValue("--extra-packages"); task.createArg().setValue(extraPackages); } |