Add new build flag LOCAL_DONT_DELETE_JAR_DIRS.

Normally the build function initialize-package-file will delete all
class files and all directory entries from JAR files, but sometimes
external projects (eg. ICU4J) depend on having directory entries in
their JAR files.

This change adds the flag LOCAL_DONT_DELETE_JAR_DIRS (analogous to the
flag LOCAL_DONT_DELETE_JAR_META_INF) which when set will skip deletion
of directory entries in initialize-package-file.

Change-Id: I4464b947b7528fca23925affa95e4071915f04d4
This commit is contained in:
Fredrik Roubert
2015-01-28 21:29:38 +01:00
committed by Ying Wang
parent 67c4d916f5
commit cc93f0c87c
5 changed files with 7 additions and 1 deletions

View File

@@ -103,6 +103,7 @@ $(built_dex): $(full_classes_jar) $(DX)
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
$(LOCAL_BUILT_MODULE): PRIVATE_SOURCE_ARCHIVE := $(full_classes_jarjar_jar)
$(LOCAL_BUILT_MODULE): PRIVATE_DONT_DELETE_JAR_DIRS := $(LOCAL_DONT_DELETE_JAR_DIRS)
$(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources)
@echo "Host Jar: $(PRIVATE_MODULE) ($@)"
$(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@)