Add removed.txt for doclava api consistency check

BUG: b/11293324
Change-Id: Ie7cda9bc7d3a1e6c433eb073cc878b149cead8a0
This commit is contained in:
Hui Shu 2014-02-21 14:18:19 -08:00
parent 64a55babf2
commit e8af17eb27
3 changed files with 16 additions and 7 deletions

View file

@ -482,6 +482,7 @@ TARGET_AVAILABLE_SDK_VERSIONS := $(call numerically_sort,\
$(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android.jar)))
INTERNAL_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/public_api.txt
INTERNAL_PLATFORM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/removed.txt
# This is the standard way to name a directory containing prebuilt target
# objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so

View file

@ -2129,17 +2129,19 @@ endef
# $(1) target
# $(2) stable api file
# $(3) api file to be tested
# $(4) arguments for apicheck
# $(5) command to run if apicheck failed
# $(6) target dependent on this api check
# $(7) additional dependencies
# $(4) removed stable api file
# $(5) removed api file to be tested
# $(6) arguments for apicheck
# $(7) command to run if apicheck failed
# $(8) target dependent on this api check
# $(9) additional dependencies
define check-api
$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp: $(2) $(3) $(APICHECK) $(7)
$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp: $(2) $(3) $(4) $(5) $(APICHECK) $(9)
@echo "Checking API:" $(1)
$(hide) ( $(APICHECK_COMMAND) $(4) $(2) $(3) || ( $(5) ; exit 38 ) )
$(hide) ( $(APICHECK_COMMAND) $(6) $(2) $(3) $(4) $(5) || ( $(7) ; exit 38 ) )
$(hide) mkdir -p $$(dir $$@)
$(hide) touch $$@
$(6): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp
$(8): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp
endef
## Whether to build from source if prebuilt alternative exists

View file

@ -42,6 +42,8 @@ $(eval $(call check-api, \
checkapi-last, \
$(SRC_API_DIR)/$(last_released_sdk_version).txt, \
$(INTERNAL_PLATFORM_API_FILE), \
$(SRC_API_DIR)/removed.txt, \
$(INTERNAL_PLATFORM_REMOVED_API_FILE), \
-hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
-error 16 -error 17 -error 18 , \
@ -56,6 +58,8 @@ $(eval $(call check-api, \
checkapi-current, \
frameworks/base/api/current.txt, \
$(INTERNAL_PLATFORM_API_FILE), \
frameworks/base/api/removed.txt, \
$(INTERNAL_PLATFORM_REMOVED_API_FILE), \
-error 2 -error 3 -error 4 -error 5 -error 6 \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
@ -69,5 +73,7 @@ $(eval $(call check-api, \
update-api: $(INTERNAL_PLATFORM_API_FILE) | $(ACP)
@echo Copying current.txt
$(hide) $(ACP) $(INTERNAL_PLATFORM_API_FILE) frameworks/base/api/current.txt
@echo Copying removed.txt
$(hide) $(ACP) $(INTERNAL_PLATFORM_REMOVED_API_FILE) frameworks/base/api/removed.txt
endif