forked from openkylin/platform_build
am e937ac81: Merge "Add new build flag LOCAL_DONT_DELETE_JAR_DIRS."
* commit 'e937ac814c7f4e1989509f94f7ac8ae5b28a3526': Add new build flag LOCAL_DONT_DELETE_JAR_DIRS.
This commit is contained in:
commit
7c05897b69
|
@ -149,6 +149,7 @@ LOCAL_LINT_FLAGS:=
|
||||||
LOCAL_SOURCE_FILES_ALL_GENERATED:= # '',true
|
LOCAL_SOURCE_FILES_ALL_GENERATED:= # '',true
|
||||||
# Don't delete the META_INF dir when merging static Java libraries.
|
# Don't delete the META_INF dir when merging static Java libraries.
|
||||||
LOCAL_DONT_DELETE_JAR_META_INF:=
|
LOCAL_DONT_DELETE_JAR_META_INF:=
|
||||||
|
LOCAL_DONT_DELETE_JAR_DIRS:=
|
||||||
LOCAL_ADDITIONAL_CERTIFICATES:=
|
LOCAL_ADDITIONAL_CERTIFICATES:=
|
||||||
LOCAL_PREBUILT_MODULE_FILE:=
|
LOCAL_PREBUILT_MODULE_FILE:=
|
||||||
LOCAL_POST_LINK_CMD:=
|
LOCAL_POST_LINK_CMD:=
|
||||||
|
|
|
@ -1785,7 +1785,9 @@ endef
|
||||||
define initialize-package-file
|
define initialize-package-file
|
||||||
@mkdir -p $(dir $(2))
|
@mkdir -p $(dir $(2))
|
||||||
$(hide) cp -f $(1) $(2)
|
$(hide) cp -f $(1) $(2)
|
||||||
$(hide) zip -qd $(2) "*.class" "*/" || true # Ignore the error when nothing to delete.
|
$(hide) zip -qd $(2) "*.class" \
|
||||||
|
$(if $(strip $(PRIVATE_DONT_DELETE_JAR_DIRS)),,"*/") \
|
||||||
|
|| true # Ignore the error when nothing to delete.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
#TODO: we kinda want to build different asset packages for
|
#TODO: we kinda want to build different asset packages for
|
||||||
|
|
|
@ -103,6 +103,7 @@ $(built_dex): $(full_classes_jar) $(DX)
|
||||||
|
|
||||||
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
|
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
|
||||||
$(LOCAL_BUILT_MODULE): PRIVATE_SOURCE_ARCHIVE := $(full_classes_jarjar_jar)
|
$(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)
|
$(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources)
|
||||||
@echo "Host Jar: $(PRIVATE_MODULE) ($@)"
|
@echo "Host Jar: $(PRIVATE_MODULE) ($@)"
|
||||||
$(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@)
|
$(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@)
|
||||||
|
|
|
@ -66,6 +66,7 @@ else # !LOCAL_IS_STATIC_JAVA_LIBRARY
|
||||||
|
|
||||||
$(common_javalib.jar): PRIVATE_DEX_FILE := $(built_dex)
|
$(common_javalib.jar): PRIVATE_DEX_FILE := $(built_dex)
|
||||||
$(common_javalib.jar): PRIVATE_SOURCE_ARCHIVE := $(full_classes_jarjar_jar)
|
$(common_javalib.jar): PRIVATE_SOURCE_ARCHIVE := $(full_classes_jarjar_jar)
|
||||||
|
$(common_javalib.jar): PRIVATE_DONT_DELETE_JAR_DIRS := $(LOCAL_DONT_DELETE_JAR_DIRS)
|
||||||
$(common_javalib.jar) : $(built_dex) $(java_resource_sources)
|
$(common_javalib.jar) : $(built_dex) $(java_resource_sources)
|
||||||
@echo "target Jar: $(PRIVATE_MODULE) ($@)"
|
@echo "target Jar: $(PRIVATE_MODULE) ($@)"
|
||||||
$(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@)
|
$(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@)
|
||||||
|
|
|
@ -384,6 +384,7 @@ else
|
||||||
$(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := $(PRODUCT_AAPT_PREF_CONFIG)
|
$(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := $(PRODUCT_AAPT_PREF_CONFIG)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
$(LOCAL_BUILT_MODULE): PRIVATE_DONT_DELETE_JAR_DIRS := $(LOCAL_DONT_DELETE_JAR_DIRS)
|
||||||
$(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest)
|
$(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest)
|
||||||
@echo "target Package: $(PRIVATE_MODULE) ($@)"
|
@echo "target Package: $(PRIVATE_MODULE) ($@)"
|
||||||
$(if $(PRIVATE_SOURCE_ARCHIVE),\
|
$(if $(PRIVATE_SOURCE_ARCHIVE),\
|
||||||
|
|
Loading…
Reference in New Issue