From ba1b925e47b40613459db97f44c15ec0a35c205d Mon Sep 17 00:00:00 2001 From: Jeongik Cha Date: Fri, 21 Apr 2023 22:55:10 +0900 Subject: [PATCH] rearrange app-related artifact path in make * move package-res.apk related files to "common" intermediate dir as aapt2.srcjar does because it is an app which is supposed to be arch neutral * add device name in auto-gen RRO to avoid conflicits Bug: 279358050 Bug: 279360102 Test: m Change-Id: Ibcc5e5546bd43767ab0d4807933eeb57d58f99d6 --- core/generate_enforce_rro.mk | 2 +- core/package_internal.mk | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/generate_enforce_rro.mk b/core/generate_enforce_rro.mk index 9079981856..e149ef4ec3 100644 --- a/core/generate_enforce_rro.mk +++ b/core/generate_enforce_rro.mk @@ -1,6 +1,6 @@ include $(CLEAR_VARS) -enforce_rro_module := $(enforce_rro_source_module)__auto_generated_rro_$(enforce_rro_partition) +enforce_rro_module := $(enforce_rro_source_module)__$(PRODUCT_NAME)__auto_generated_rro_$(enforce_rro_partition) LOCAL_PACKAGE_NAME := $(enforce_rro_module) intermediates := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),,COMMON) diff --git a/core/package_internal.mk b/core/package_internal.mk index c7a173b71f..2d0a569f5e 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -201,10 +201,10 @@ my_res_resources := $(if $(my_res_dir),$(strip \ all_resources := $(strip $(my_res_resources) $(my_overlay_resources)) # The linked resource package. -my_res_package := $(intermediates)/package-res.apk +my_res_package := $(intermediates.COMMON)/package-res.apk LOCAL_INTERMEDIATE_TARGETS += $(my_res_package) -my_bundle_module := $(intermediates)/base.zip +my_bundle_module := $(intermediates.COMMON)/base.zip LOCAL_INTERMEDIATE_TARGETS += $(my_bundle_module) # Always run aapt2, because we need to at least compile the AndroidManifest.xml. @@ -570,7 +570,7 @@ ifdef LOCAL_COMPRESSED_MODULE $(compress-package) endif # LOCAL_COMPRESSED_MODULE -my_package_res_pb := $(intermediates)/package-res.pb.apk +my_package_res_pb := $(intermediates.COMMON)/package-res.pb.apk $(my_package_res_pb): $(my_res_package) $(AAPT2) $(AAPT2) convert --output-format proto $< -o $@