summaryrefslogtreecommitdiffstats
path: root/core/package_internal.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-03-27 11:07:17 -0700
committerYing Wang <wangying@google.com>2015-03-27 11:30:51 -0700
commit454bcff25557ca29866081d9a9037673096e463b (patch)
tree926d8969cfb297314584d7fa1d6655a8731a634f /core/package_internal.mk
parent1b23b33d92f32626584153739308e9147d1541bd (diff)
downloadbuild-454bcff25557ca29866081d9a9037673096e463b.zip
build-454bcff25557ca29866081d9a9037673096e463b.tar.gz
build-454bcff25557ca29866081d9a9037673096e463b.tar.bz2
Add back Java resources to apk without Java code.
With commit 33360dd56925276e4526f5f52c26423e2bb1a670 we moved Java resource packaging forward to creation of the jar file. But the Java resource packaging will be skipped if a module has no Java code at all. (The build system does support building an apk without Java code.) In this change we add back the Java resources directly to the built apk when the apk has no Java code. (cherry-picked from commit 8b27d1879c5692ebe6c5ac85383981fd96dfe2e1) Bug: 19947218 Change-Id: I0e1a65a9cbe656974f8ef3923b2f15e9efa5feb9
Diffstat (limited to 'core/package_internal.mk')
-rw-r--r--core/package_internal.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/package_internal.mk b/core/package_internal.mk
index e389b04..5dac455 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -396,7 +396,10 @@ $(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_
ifneq ($(jni_shared_libraries),)
$(add-jni-shared-libs-to-package)
endif
-ifneq ($(full_classes_jar),)
+ifeq ($(full_classes_jar),)
+# We don't build jar, need to add the Java resources here.
+ $(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@))
+else
$(add-dex-to-package)
endif
$(sign-package)