From c3c62fba966cc6e8aec647a340ba2a1d1d9ca096 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 8 Oct 2018 11:22:10 -0700 Subject: [PATCH] Don't zip hiddenapi output jar into jar Zip classes*.dex so that the jar does not contain an empty classes.jar. Test: m out/target/common/obj/JAVA_LIBRARIES/android.test.base.impl_intermediates/javalib.jar Change-Id: I53bdd2035b2963dd781734da64058c95e1cff9d4 --- core/definitions.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/definitions.mk b/core/definitions.mk index 50e98b261..34f6ed76d 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2739,7 +2739,7 @@ $(call hiddenapi-copy-dex-files,\ $(2): OUTPUT_DIR := $(dir $(call hiddenapi-soong-output-dex,$(2))) $(2): OUTPUT_JAR := $(dir $(call hiddenapi-soong-output-dex,$(2)))classes.jar $(2): $(1) $(call hiddenapi-soong-output-dex,$(2)) | $(SOONG_ZIP) $(MERGE_ZIPS) - $(SOONG_ZIP) -o $${OUTPUT_JAR} -C $${OUTPUT_DIR} -D $${OUTPUT_DIR} + $(SOONG_ZIP) -o $${OUTPUT_JAR} -C $${OUTPUT_DIR} -f "$${OUTPUT_DIR}/classes*.dex" $(MERGE_ZIPS) -D -zipToNotStrip $${OUTPUT_JAR} -stripFile "classes*.dex" $(2) $${OUTPUT_JAR} $(1) endef