Convert BuildIgnoreApexContritbutions variable to a boolean

(This relands aosp/3007754 with additional handling for go apexes. The
additional handling was added in internal in ag/26705862, so we need to
add this to aosp as well)

The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored

Test: m nothing on aosp,google and google_fullmte devices
Ignore-AOSP-first: CL topic does a cleanup of an internal only denylist

Merged-In: If899f6eaf5449c2aa789d0bd5b791a3db715c676
Merged-In: I4532f3743eb3b7121e1f5e522097c1aba3d9a4fd
Change-Id: I18db6657b78b2741c7f9af9e9d0150f85edeeda7
This commit is contained in:
Spandan Das
2024-02-20 07:48:22 +00:00
parent 83162dfcec
commit 7f52f2a804
3 changed files with 19 additions and 2 deletions

View File

@@ -456,7 +456,7 @@ _product_list_vars += PRODUCT_VALIDATION_CHECKS
_product_single_value_vars += PRODUCT_BUILD_FROM_SOURCE_STUB _product_single_value_vars += PRODUCT_BUILD_FROM_SOURCE_STUB
_product_list_vars += PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS _product_single_value_vars += PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS
_product_single_value_vars += PRODUCT_HIDDEN_API_EXPORTABLE_STUBS _product_single_value_vars += PRODUCT_HIDDEN_API_EXPORTABLE_STUBS

View File

@@ -301,6 +301,23 @@ ifeq (, $(PRODUCT_INCLUDE_TAGS))
PRODUCT_INCLUDE_TAGS += com.android.mainline mainline_module_prebuilt_nightly PRODUCT_INCLUDE_TAGS += com.android.mainline mainline_module_prebuilt_nightly
endif endif
# AOSP and Google products currently share the same `apex_contributions` in next.
# This causes issues when building <aosp_product>-next-userdebug in main.
# Create a temporary allowlist to ignore the google apexes listed in `contents` of apex_contributions of `next`
# *for aosp products*.
# TODO(b/308187268): Remove this denylist mechanism
# Use PRODUCT_PACKAGES to determine if this is an aosp product. aosp products do not use google signed apexes.
ignore_apex_contributions :=
ifeq (,$(findstring com.google.android.conscrypt,$(PRODUCT_PACKAGES))$(findstring com.google.android.go.conscrypt,$(PRODUCT_PACKAGES)))
ignore_apex_contributions := true
endif
ifeq (true,$(PRODUCT_MODULE_BUILD_FROM_SOURCE))
ignore_apex_contributions := true
endif
ifeq (true, $(ignore_apex_contributions))
PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS := true
endif
############################################################################# #############################################################################
# Quick check and assign default values # Quick check and assign default values

View File

@@ -339,7 +339,7 @@ $(call add_json_bool, KeepVndk, $(filter true,$(KEEP_VNDK)))
$(call add_json_bool, CheckVendorSeappViolations, $(filter true,$(CHECK_VENDOR_SEAPP_VIOLATIONS))) $(call add_json_bool, CheckVendorSeappViolations, $(filter true,$(CHECK_VENDOR_SEAPP_VIOLATIONS)))
$(call add_json_list, BuildIgnoreApexContributionContents, $(sort $(PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS))) $(call add_json_bool, BuildIgnoreApexContributionContents, $(PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS))
$(call add_json_map, PartitionVarsForBazelMigrationOnlyDoNotUse) $(call add_json_map, PartitionVarsForBazelMigrationOnlyDoNotUse)
$(call add_json_str, ProductDirectory, $(dir $(INTERNAL_PRODUCT))) $(call add_json_str, ProductDirectory, $(dir $(INTERNAL_PRODUCT)))