summaryrefslogtreecommitdiffstats
path: root/core/host_dalvik_java_library.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-01-14 14:23:56 -0800
committerYing Wang <wangying@google.com>2015-01-21 11:57:52 -0800
commit07acdbfd32f8164c05b0035c80fe16adb5c03280 (patch)
treef489a281347fec0a682860fbeeac54909fb090a1 /core/host_dalvik_java_library.mk
parent17967eb72f0eb7f495800d5065b64db4a0174362 (diff)
downloadbuild-07acdbfd32f8164c05b0035c80fe16adb5c03280.zip
build-07acdbfd32f8164c05b0035c80fe16adb5c03280.tar.gz
build-07acdbfd32f8164c05b0035c80fe16adb5c03280.tar.bz2
Running jarjar on Java resources.
Before this change, Java resources are added as a separate step (add-java-resources-to-package) after dex is run, so jarjar isn't run on the resource files. With this change, we add Java resources immediately after we call javac, so jarjar is run on the resource files (the module's own resource, as well as resources carried by static Java libraries). When we generate the final apk/jar, we use the jarjar'ed jar as the inital pacakge file, with class files and empty folders removed. (cherry-picked from commit 140274707e31c9585aa28b0de2f1418c64ecd272) Bug: 18837479 Change-Id: I15ecf282bfb65fd53dd03fbd03dd4c71927c186a
Diffstat (limited to 'core/host_dalvik_java_library.mk')
-rw-r--r--core/host_dalvik_java_library.mk7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/host_dalvik_java_library.mk b/core/host_dalvik_java_library.mk
index 6583dd7..061511b 100644
--- a/core/host_dalvik_java_library.mk
+++ b/core/host_dalvik_java_library.mk
@@ -101,13 +101,10 @@ $(built_dex): $(full_classes_jar) $(DX)
$(transform-classes.jar-to-dex)
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
+$(LOCAL_BUILT_MODULE): PRIVATE_SOURCE_ARCHIVE := $(full_classes_jarjar_jar)
$(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources)
@echo "Host Jar: $(PRIVATE_MODULE) ($@)"
- $(create-empty-package)
+ $(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@)
$(add-dex-to-package)
- $(add-carried-java-resources)
-ifneq ($(extra_jar_args),)
- $(add-java-resources-to-package)
-endif
USE_CORE_LIB_BOOTCLASSPATH :=