hiddenapi: Process core.platform.api.stubs

Pass @CorePlatformApi stubs to the `hiddenapi` singleton rule which
generate a CSV of all public or domain API flags.

Bug: 119068555
Test: m appcompat
Test: dexlayout <core-oj jar> | grep CORE-PLATFORM-API
Change-Id: I597ee330835e564d61cfac44497e762b552b901c
This commit is contained in:
David Brazdil 2018-12-14 16:10:09 +00:00
parent fc274bab4d
commit 96e973b304
1 changed files with 8 additions and 1 deletions

View File

@ -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)))
@ -68,14 +72,17 @@ $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_DEX_INPUTS := $(SOONG_HIDDENA
$(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_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 \
--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))