Merge "Move private_manifest file insertion to jars merging phase." am: 3d6aaa2f56 am: d43952b8f8

am: abbb6a1fa1

Change-Id: I3fa4dd88b143119aa5692a437a9da6e9aa535542
This commit is contained in:
Nan Zhang 2017-09-21 03:26:18 +00:00 committed by android-build-merger
commit c128894560
4 changed files with 18 additions and 19 deletions

View File

@ -2269,12 +2269,7 @@ $(if $(PRIVATE_JAR_PACKAGES), \
$(if $(PRIVATE_JAR_EXCLUDE_PACKAGES), $(hide) rm -rf \ $(if $(PRIVATE_JAR_EXCLUDE_PACKAGES), $(hide) rm -rf \
$(foreach pkg, $(PRIVATE_JAR_EXCLUDE_PACKAGES), \ $(foreach pkg, $(PRIVATE_JAR_EXCLUDE_PACKAGES), \
$(PRIVATE_CLASS_INTERMEDIATES_DIR)/$(subst .,/,$(pkg)))) $(PRIVATE_CLASS_INTERMEDIATES_DIR)/$(subst .,/,$(pkg))))
$(if $(PRIVATE_JAR_MANIFEST), \ $(hide) $(JAR) -cf $@ $(call jar-args-sorted-files-in-directory,$(PRIVATE_CLASS_INTERMEDIATES_DIR))
$(hide) sed -e "s/%BUILD_NUMBER%/$(BUILD_NUMBER_FROM_FILE)/" \
$(PRIVATE_JAR_MANIFEST) > $(dir $@)/manifest.mf && \
$(JAR) -cfm $@ $(dir $@)/manifest.mf, \
$(hide) $(JAR) -cf $@) \
$(call jar-args-sorted-files-in-directory,$(PRIVATE_CLASS_INTERMEDIATES_DIR))
$(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@)) $(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@))
endef endef

View File

@ -112,7 +112,6 @@ $(full_classes_compiled_jar): \
$(java_source_list_file) \ $(java_source_list_file) \
$(java_sources_deps) \ $(java_sources_deps) \
$(full_java_header_libs) \ $(full_java_header_libs) \
$(jar_manifest_file) \
$(annotation_processor_deps) \ $(annotation_processor_deps) \
$(NORMALIZE_PATH) \ $(NORMALIZE_PATH) \
$(JAR_ARGS) \ $(JAR_ARGS) \
@ -125,7 +124,6 @@ $(full_classes_turbine_jar): \
$(java_source_list_file) \ $(java_source_list_file) \
$(java_sources_deps) \ $(java_sources_deps) \
$(full_java_header_libs) \ $(full_java_header_libs) \
$(jar_manifest_file) \
$(NORMALIZE_PATH) \ $(NORMALIZE_PATH) \
$(JAR_ARGS) \ $(JAR_ARGS) \
$(ZIPTIME) \ $(ZIPTIME) \
@ -149,10 +147,13 @@ $(eval $(call copy-one-file,$(full_classes_header_jarjar),$(full_classes_header_
$(full_classes_combined_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF) $(full_classes_combined_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF)
$(full_classes_combined_jar): $(full_classes_compiled_jar) \ $(full_classes_combined_jar): $(full_classes_compiled_jar) \
$(jar_manifest_file) \
$(full_static_java_libs) | $(MERGE_ZIPS) $(full_static_java_libs) | $(MERGE_ZIPS)
$(MERGE_ZIPS) -j \ $(if $(PRIVATE_JAR_MANIFEST), $(hide) sed -e "s/%BUILD_NUMBER%/$(BUILD_NUMBER_FROM_FILE)/" \
$(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,-stripDir META-INF -zipToNotStrip $<) \ $(PRIVATE_JAR_MANIFEST) > $(dir $@)/manifest.mf)
$@ $< $(call reverse-list,$(PRIVATE_STATIC_JAVA_LIBRARIES)) $(MERGE_ZIPS) -j $(if $(PRIVATE_JAR_MANIFEST),-m $(dir $@)/manifest.mf) \
$(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,-stripDir META-INF -zipToNotStrip $<) \
$@ $< $(call reverse-list,$(PRIVATE_STATIC_JAVA_LIBRARIES))
# Run jarjar if necessary, otherwise just copy the file. # Run jarjar if necessary, otherwise just copy the file.
ifneq ($(strip $(LOCAL_JARJAR_RULES)),) ifneq ($(strip $(LOCAL_JARJAR_RULES)),)

View File

@ -82,7 +82,6 @@ $(full_classes_compiled_jar): \
$(java_source_list_file) \ $(java_source_list_file) \
$(java_sources_deps) \ $(java_sources_deps) \
$(full_java_libs) \ $(full_java_libs) \
$(jar_manifest_file) \
$(annotation_processor_deps) \ $(annotation_processor_deps) \
$(NORMALIZE_PATH) \ $(NORMALIZE_PATH) \
$(ZIPTIME) \ $(ZIPTIME) \
@ -95,8 +94,12 @@ javac-check : $(full_classes_compiled_jar)
javac-check-$(LOCAL_MODULE) : $(full_classes_compiled_jar) javac-check-$(LOCAL_MODULE) : $(full_classes_compiled_jar)
$(full_classes_combined_jar): $(full_classes_compiled_jar) \ $(full_classes_combined_jar): $(full_classes_compiled_jar) \
$(jar_manifest_file) \
$(full_static_java_libs) | $(MERGE_ZIPS) $(full_static_java_libs) | $(MERGE_ZIPS)
$(MERGE_ZIPS) -j -stripDir META-INF -zipToNotStrip $< $@ $< $(call reverse-list,$(PRIVATE_STATIC_JAVA_LIBRARIES)) $(if $(PRIVATE_JAR_MANIFEST), $(hide) sed -e "s/%BUILD_NUMBER%/$(BUILD_NUMBER_FROM_FILE)/" \
$(PRIVATE_JAR_MANIFEST) > $(dir $@)/manifest.mf)
$(MERGE_ZIPS) -j $(if $(PRIVATE_JAR_MANIFEST),-m $(dir $@)/manifest.mf) \
-stripDir META-INF -zipToNotStrip $< $@ $< $(call reverse-list,$(PRIVATE_STATIC_JAVA_LIBRARIES))
# Run jarjar if necessary, otherwise just copy the file. # Run jarjar if necessary, otherwise just copy the file.
ifneq ($(strip $(LOCAL_JARJAR_RULES)),) ifneq ($(strip $(LOCAL_JARJAR_RULES)),)

View File

@ -489,7 +489,6 @@ $(full_classes_compiled_jar): \
$(java_source_list_file) \ $(java_source_list_file) \
$(java_sources_deps) \ $(java_sources_deps) \
$(full_java_header_libs) \ $(full_java_header_libs) \
$(jar_manifest_file) \
$(layers_file) \ $(layers_file) \
$(annotation_processor_deps) \ $(annotation_processor_deps) \
$(NORMALIZE_PATH) \ $(NORMALIZE_PATH) \
@ -503,8 +502,6 @@ $(full_classes_turbine_jar): \
$(java_source_list_file) \ $(java_source_list_file) \
$(java_sources_deps) \ $(java_sources_deps) \
$(full_java_header_libs) \ $(full_java_header_libs) \
$(jar_manifest_file) \
$(layers_file) \
$(NORMALIZE_PATH) \ $(NORMALIZE_PATH) \
$(JAR_ARGS) \ $(JAR_ARGS) \
$(ZIPTIME) \ $(ZIPTIME) \
@ -531,10 +528,13 @@ javac-check-$(LOCAL_MODULE) : $(full_classes_compiled_jar)
$(full_classes_combined_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF) $(full_classes_combined_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF)
$(full_classes_combined_jar): $(full_classes_compiled_jar) \ $(full_classes_combined_jar): $(full_classes_compiled_jar) \
$(jar_manifest_file) \
$(full_static_java_libs) | $(MERGE_ZIPS) $(full_static_java_libs) | $(MERGE_ZIPS)
$(MERGE_ZIPS) -j \ $(if $(PRIVATE_JAR_MANIFEST), $(hide) sed -e "s/%BUILD_NUMBER%/$(BUILD_NUMBER_FROM_FILE)/" \
$(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,-stripDir META-INF -zipToNotStrip $<) \ $(PRIVATE_JAR_MANIFEST) > $(dir $@)/manifest.mf)
$@ $< $(call reverse-list,$(PRIVATE_STATIC_JAVA_LIBRARIES)) $(MERGE_ZIPS) -j $(if $(PRIVATE_JAR_MANIFEST),-m $(dir $@)/manifest.mf) \
$(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,-stripDir META-INF -zipToNotStrip $<) \
$@ $< $(call reverse-list,$(PRIVATE_STATIC_JAVA_LIBRARIES))
ifdef LOCAL_JAR_PROCESSOR ifdef LOCAL_JAR_PROCESSOR
# LOCAL_JAR_PROCESSOR_ARGS must be evaluated here to set up the rule-local # LOCAL_JAR_PROCESSOR_ARGS must be evaluated here to set up the rule-local