diff options
author | Ying Wang <wangying@google.com> | 2011-12-15 16:36:55 -0800 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2011-12-15 16:36:55 -0800 |
commit | 5758b8ed96783861c72b94a822c0ed581f414388 (patch) | |
tree | 5399ec6f281fc3ca327d864cbc507883c78c19b4 /core/static_java_library.mk | |
parent | bf6c611cae9c8c3540bed07cd3864026a48ca229 (diff) | |
download | build-5758b8ed96783861c72b94a822c0ed581f414388.zip build-5758b8ed96783861c72b94a822c0ed581f414388.tar.gz build-5758b8ed96783861c72b94a822c0ed581f414388.tar.bz2 |
Remove the R/Manifest classes when building the static Java library
Bug: 5448433
Instead of deferring the removal to building the app.
In that case any R/Manifest classes in any static Java libraries will be
deleted, no matter if they are generated from Android resource, or just
source R.java/Manifest.java in the source tree by accident.
Change-Id: I656f45e3cbc3796c5d4832363231480b3f1dc5b8
Diffstat (limited to 'core/static_java_library.mk')
-rw-r--r-- | core/static_java_library.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/static_java_library.mk b/core/static_java_library.mk index 3a1925d..d317691 100644 --- a/core/static_java_library.mk +++ b/core/static_java_library.mk @@ -34,6 +34,13 @@ all_resources := $(strip \ ) \ ) \ )) + +ifneq (,$(all_resources)) +# Those files will be excluded from the built jar. +# The R/Manifest classes should be re-generated in the app Module instead. +# Use '' and $ escape because they will be passed to bash. +LOCAL_JAR_EXCLUDE_FILES := 'R.class' 'R$$*.class' 'Manifest.class' 'Manifest$$*.class' +endif endif include $(BUILD_SYSTEM)/java_library.mk @@ -93,3 +100,4 @@ endif endif # $(all_resources) not empty LOCAL_IS_STATIC_JAVA_LIBRARY := +LOCAL_JAR_EXCLUDE_FILES := |