Merge "Run appcompat on all /product modules."

This commit is contained in:
Dario Freni 2018-07-20 08:59:35 +00:00 committed by Gerrit Code Review
commit 88858574b0
3 changed files with 27 additions and 0 deletions

View file

@ -2557,6 +2557,17 @@ $(hide) \
mv $@.compressed $@;
endef
ifeq ($(HOST_OS),linux)
# Runs appcompat and store logs in $(PRODUCT_OUT)/appcompat
define run-appcompat
$(hide) \
mkdir -p $(PRODUCT_OUT)/appcompat; \
art/tools/veridex/appcompat.sh --dex-file=$@ 2>&1 > $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log;
endef
else
run-appcompat =
endif
# Remove dynamic timestamps from packages
#
define remove-timestamps-from-package

View file

@ -590,6 +590,10 @@ else
endif
endif
ifdef LOCAL_PRODUCT_MODULE
$(LOCAL_BUILT_MODULE) : $(call intermediates-dir-for,PACKAGING,veridex,HOST)/veridex.zip
endif
$(LOCAL_BUILT_MODULE): PRIVATE_DONT_DELETE_JAR_DIRS := $(LOCAL_DONT_DELETE_JAR_DIRS)
$(LOCAL_BUILT_MODULE): PRIVATE_RESOURCE_INTERMEDIATES_DIR := $(intermediates.COMMON)/resources
$(LOCAL_BUILT_MODULE): PRIVATE_FULL_CLASSES_JAR := $(full_classes_jar)
@ -630,6 +634,10 @@ ifeq (true, $(LOCAL_UNCOMPRESS_DEX))
@# No need to align, sign-package below will do it.
$(uncompress-dexs)
endif
# Run appcompat before stripping the classes.dex file.
ifdef LOCAL_PRODUCT_MODULE
$(run-appcompat)
endif # LOCAL_PRODUCT_MODULE
ifdef LOCAL_DEX_PREOPT
ifneq ($(BUILD_PLATFORM_ZIP),)
@# Keep a copy of apk with classes.dex unstripped

View file

@ -376,6 +376,10 @@ ifdef LOCAL_COMPRESSED_MODULE
$(built_module) : $(MINIGZIP)
endif
ifdef LOCAL_PRODUCT_MODULE
$(built_module) : $(call intermediates-dir-for,PACKAGING,veridex,HOST)/veridex.zip
endif
$(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(SIGNAPK_JAR)
$(transform-prebuilt-to-target)
$(uncompress-shared-libs)
@ -390,6 +394,10 @@ endif # BUILD_PLATFORM_ZIP
endif # LOCAL_DEX_PREOPT
ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
@# Only strip out files if we can re-sign the package.
# Run appcompat before stripping the classes.dex file.
ifdef LOCAL_PRODUCT_MODULE
$(run-appcompat)
endif # LOCAL_PRODUCT_MODULE
ifdef LOCAL_DEX_PREOPT
ifneq (nostripping,$(LOCAL_DEX_PREOPT))
$(call dexpreopt-remove-classes.dex,$@)