forked from openkylin/platform_build
Merge changes from topics "coreapi-flag", "coreapi-stubs-csv"
* changes: hiddenapi: Process core.platform.api.stubs Replace hiddenapi-{public,private}-list.txt with a CSV file
This commit is contained in:
commit
4ac7810755
|
@ -1226,9 +1226,8 @@ ifndef INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE
|
|||
INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-private-dex.txt
|
||||
endif
|
||||
|
||||
INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-public-list.txt
|
||||
INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-private-list.txt
|
||||
INTERNAL_PLATFORM_HIDDENAPI_FLAGS := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-flags.csv
|
||||
INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-stub-flags.txt
|
||||
INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-greylist.csv
|
||||
|
||||
# Missing optional uses-libraries so that the platform doesn't create build rules that depend on
|
||||
|
|
|
@ -2679,8 +2679,8 @@ $(2): $(1) $(HIDDENAPI) $(INTERNAL_PLATFORM_HIDDENAPI_FLAGS)
|
|||
echo "--output-dex=$(dir $(2))/`basename $$$${INPUT_DEX}`"; \
|
||||
done | xargs $(HIDDENAPI) encode --api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS)
|
||||
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(1)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_DEX_INPUTS := $$(PRIVATE_DEX_INPUTS) $(1)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(1)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_DEX_INPUTS := $$(PRIVATE_DEX_INPUTS) $(1)
|
||||
endef
|
||||
else # UNSAFE_DISABLE_HIDDENAPI_FLAGS
|
||||
define hiddenapi-copy-dex-files
|
||||
|
@ -2696,12 +2696,12 @@ endif # UNSAFE_DISABLE_HIDDENAPI_FLAGS
|
|||
define hiddenapi-generate-csv
|
||||
ifneq (,$(wildcard frameworks/base))
|
||||
# Only generate this target if we're in a tree with frameworks/base present.
|
||||
$(2): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
|
||||
$(CLASS2GREYLIST) --public-api-list $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(1) \
|
||||
$(2): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
|
||||
$(CLASS2GREYLIST) --stub-api-flags $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS) $(1) \
|
||||
--write-flags-csv $(2)
|
||||
|
||||
$(3): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
|
||||
$(CLASS2GREYLIST) --public-api-list $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(1) \
|
||||
$(3): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
|
||||
$(CLASS2GREYLIST) --stub-api-flags $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS) $(1) \
|
||||
--write-metadata-csv $(3)
|
||||
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS): $(2)
|
||||
|
|
|
@ -47,6 +47,10 @@ HIDDENAPI_STUBS_SYSTEM := \
|
|||
HIDDENAPI_STUBS_TEST := \
|
||||
$(call hiddenapi_stubs_jar,android_test_stubs_current)
|
||||
|
||||
# Core Platform API stubs
|
||||
HIDDENAPI_STUBS_CORE_PLATFORM := \
|
||||
$(call hiddenapi_stubs_jar,core.platform.api.stubs)
|
||||
|
||||
# Allow products to define their own stubs for custom product jars that apps can use.
|
||||
ifdef PRODUCT_HIDDENAPI_STUBS
|
||||
HIDDENAPI_STUBS += $(foreach stub,$(PRODUCT_HIDDENAPI_STUBS), $(call hiddenapi_stubs_jar,$(stub)))
|
||||
|
@ -62,29 +66,25 @@ endif
|
|||
|
||||
# Singleton rule which applies $(HIDDENAPI) on all boot class path dex files.
|
||||
# Additional inputs are filled with `hiddenapi-copy-dex-files` rules.
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(SOONG_HIDDENAPI_DEX_INPUTS)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_DEX_INPUTS := $(SOONG_HIDDENAPI_DEX_INPUTS)
|
||||
|
||||
.KATI_RESTAT: \
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS := $(HIDDENAPI_STUBS)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS_SYSTEM := $(HIDDENAPI_STUBS_SYSTEM)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS_TEST := $(HIDDENAPI_STUBS_TEST)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): \
|
||||
.KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(HIDDENAPI) $(HIDDENAPI_STUBS) \
|
||||
$(HIDDENAPI_STUBS_SYSTEM) $(HIDDENAPI_STUBS_TEST)
|
||||
.KATI_RESTAT: $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(SOONG_HIDDENAPI_DEX_INPUTS)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_DEX_INPUTS := $(SOONG_HIDDENAPI_DEX_INPUTS)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS := $(HIDDENAPI_STUBS)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_SYSTEM := $(HIDDENAPI_STUBS_SYSTEM)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_TEST := $(HIDDENAPI_STUBS_TEST)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_CORE_PLATFORM := $(HIDDENAPI_STUBS_CORE_PLATFORM)
|
||||
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(HIDDENAPI) $(HIDDENAPI_STUBS) \
|
||||
$(HIDDENAPI_STUBS_SYSTEM) $(HIDDENAPI_STUBS_TEST) \
|
||||
$(HIDDENAPI_STUBS_CORE_PLATFORM)
|
||||
for INPUT_DEX in $(PRIVATE_DEX_INPUTS); do \
|
||||
find `dirname $${INPUT_DEX}` -maxdepth 1 -name "classes*.dex"; \
|
||||
done | sort | sed 's/^/--boot-dex=/' | xargs $(HIDDENAPI) list \
|
||||
--stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS)) \
|
||||
--stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_SYSTEM)) \
|
||||
--stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_TEST)) \
|
||||
--out-public=$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST).tmp \
|
||||
--out-private=$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST).tmp
|
||||
$(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST))
|
||||
$(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST))
|
||||
--public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS)) \
|
||||
--public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_SYSTEM)) \
|
||||
--public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_TEST)) \
|
||||
--core-platform-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_CORE_PLATFORM)) \
|
||||
--out-api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS).tmp
|
||||
$(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS))
|
||||
|
||||
# Inputs to singleton rules located in frameworks/base
|
||||
# Additional inputs are filled with `hiddenapi-generate-csv`
|
||||
|
|
|
@ -152,7 +152,7 @@ $(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACK
|
|||
$(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE))
|
||||
$(call add_json_list, EnforceSystemCertificateWhitelist, $(ENFORCE_SYSTEM_CERTIFICATE_WHITELIST))
|
||||
|
||||
$(call add_json_str, HiddenAPIPublicList, $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST))
|
||||
$(call add_json_str, HiddenAPIStubFlags, $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS))
|
||||
$(call add_json_str, HiddenAPIFlags, $(INTERNAL_PLATFORM_HIDDENAPI_FLAGS))
|
||||
$(call add_json_list, HiddenAPIExtraAppUsageJars, $(HIDDENAPI_EXTRA_APP_USAGE_JARS))
|
||||
|
||||
|
|
Loading…
Reference in New Issue