Move private_manifest file insertion to jars merging phase.

By doing this, the change of private_manifest file won't trigger
Javac to re-run during re-build.

Bug: b/65455145
Test: m clean && m -j32
Change-Id: Ib90d56daf0be5f31b51e07b7714a933bc5cf4496
This commit is contained in:
Nan Zhang
2017-09-20 14:56:48 -07:00
parent 3b236ad3e3
commit b88011768d
4 changed files with 18 additions and 19 deletions

View File

@@ -476,7 +476,6 @@ $(full_classes_compiled_jar): \
$(java_source_list_file) \
$(java_sources_deps) \
$(full_java_header_libs) \
$(jar_manifest_file) \
$(layers_file) \
$(annotation_processor_deps) \
$(NORMALIZE_PATH) \
@@ -490,8 +489,6 @@ $(full_classes_turbine_jar): \
$(java_source_list_file) \
$(java_sources_deps) \
$(full_java_header_libs) \
$(jar_manifest_file) \
$(layers_file) \
$(NORMALIZE_PATH) \
$(JAR_ARGS) \
$(ZIPTIME) \
@@ -518,10 +515,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): $(full_classes_compiled_jar) \
$(jar_manifest_file) \
$(full_static_java_libs) | $(MERGE_ZIPS)
$(MERGE_ZIPS) -j \
$(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,-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) \
$(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,-stripDir META-INF -zipToNotStrip $<) \
$@ $< $(call reverse-list,$(PRIVATE_STATIC_JAVA_LIBRARIES))
ifdef LOCAL_JAR_PROCESSOR
# LOCAL_JAR_PROCESSOR_ARGS must be evaluated here to set up the rule-local