From e3cf60911a135738495f0a579a0368b9fc231f67 Mon Sep 17 00:00:00 2001 From: Bill Peckham Date: Fri, 8 Jan 2021 09:37:47 -0800 Subject: [PATCH] Enable prebuilt hiddenapi CSV files. By enabling these hiddenapi CSV files to be prebuilt, it becomes possible to create a split build that supports the hiddenapi encode dex step, but doesn't contain all of the java sources needed to generate the CSV files. Bug: 175048716 Test: m nothing Test: new TestHiddenAPISingletonWithPrebuiltCsvFile Test: local build without prebuilt hiddenapi Test: local build with prebuilt hiddenapi Change-Id: Ia38c5016d2aeba54aa537a5ce601898d46330730 --- core/config.mk | 7 +++++++ core/soong_config.mk | 1 + 2 files changed, 8 insertions(+) diff --git a/core/config.mk b/core/config.mk index 9c04fe0f0f..ed6429ae29 100644 --- a/core/config.mk +++ b/core/config.mk @@ -990,6 +990,13 @@ $(foreach device,$(call to-upper,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)), \ endif # PRODUCT_USE_DYNAMIC_PARTITIONS +# By default, we build the hidden API csv files from source. You can use +# prebuilt hiddenapi files by setting BOARD_PREBUILT_HIDDENAPI_DIR to the name +# of a directory containing both prebuilt hiddenapi-flags.csv and +# hiddenapi-index.csv. +BOARD_PREBUILT_HIDDENAPI_DIR ?= +.KATI_READONLY := BOARD_PREBUILT_HIDDENAPI_DIR + # ############################################################### # Set up final options. # ############################################################### diff --git a/core/soong_config.mk b/core/soong_config.mk index 5ca1d1073d..baf2177ac5 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -231,6 +231,7 @@ $(call add_json_list, BoardKernelBinaries, $(BOARD_KERNEL_BINARIES)) $(call add_json_list, BoardKernelModuleInterfaceVersions, $(BOARD_KERNEL_MODULE_INTERFACE_VERSIONS)) $(call add_json_bool, BoardMoveRecoveryResourcesToVendorBoot, $(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT)) +$(call add_json_str, PrebuiltHiddenApiDir, $(BOARD_PREBUILT_HIDDENAPI_DIR)) $(call json_end)