Merge "Let apicheck check both the public API and system API." into lmp-mr1-dev

This commit is contained in:
Ying Wang 2015-01-22 20:36:52 +00:00 committed by Android (Google) Code Review
commit 507ea383aa
2 changed files with 21 additions and 12 deletions

View File

@ -7,7 +7,7 @@ To make these errors go away, you have two choices:
errors above. errors above.
2) You can update current.txt by executing the following command: 2) You can update current.txt by executing the following command:
make %UPDATE_API% make update-api
To submit the revised current.txt to the main Android repository, To submit the revised current.txt to the main Android repository,
you will need approval. you will need approval.

View File

@ -31,6 +31,11 @@ last_released_sdk_version := $(lastword $(call numerically_sort, \
)\ )\
)) ))
.PHONY: check-public-api
checkapi : check-public-api
.PHONY: update-api
# INTERNAL_PLATFORM_API_FILE is the one build by droiddoc. # INTERNAL_PLATFORM_API_FILE is the one build by droiddoc.
# Note that since INTERNAL_PLATFORM_API_FILE is the byproduct of api-stubs module, # Note that since INTERNAL_PLATFORM_API_FILE is the byproduct of api-stubs module,
# (See frameworks/base/Android.mk) # (See frameworks/base/Android.mk)
@ -39,7 +44,7 @@ last_released_sdk_version := $(lastword $(call numerically_sort, \
# Check that the API we're building hasn't broken the last-released # Check that the API we're building hasn't broken the last-released
# SDK version. # SDK version.
$(eval $(call check-api, \ $(eval $(call check-api, \
checkapi-last, \ checkpublicapi-last, \
$(SRC_API_DIR)/$(last_released_sdk_version).txt, \ $(SRC_API_DIR)/$(last_released_sdk_version).txt, \
$(INTERNAL_PLATFORM_API_FILE), \ $(INTERNAL_PLATFORM_API_FILE), \
frameworks/base/api/removed.txt, \ frameworks/base/api/removed.txt, \
@ -48,14 +53,14 @@ $(eval $(call check-api, \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \ -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 16 -error 17 -error 18 , \
cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \ cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \
checkapi, \ check-public-api, \
$(call doc-timestamp-for,api-stubs) \ $(call doc-timestamp-for,api-stubs) \
)) ))
# Check that the API we're building hasn't changed from the not-yet-released # Check that the API we're building hasn't changed from the not-yet-released
# SDK version. # SDK version.
$(eval $(call check-api, \ $(eval $(call check-api, \
checkapi-current, \ checkpublicapi-current, \
frameworks/base/api/current.txt, \ frameworks/base/api/current.txt, \
$(INTERNAL_PLATFORM_API_FILE), \ $(INTERNAL_PLATFORM_API_FILE), \
frameworks/base/api/removed.txt, \ frameworks/base/api/removed.txt, \
@ -64,21 +69,23 @@ $(eval $(call check-api, \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \ -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 \ -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
-error 25 -error 26 -error 27, \ -error 25 -error 26 -error 27, \
sed -e 's/%UPDATE_API%/update-api/g' $(BUILD_SYSTEM)/apicheck_msg_current.txt, \ cat $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
checkapi, \ check-public-api, \
$(call doc-timestamp-for,api-stubs) \ $(call doc-timestamp-for,api-stubs) \
)) ))
.PHONY: update-api .PHONY: update-public-api
update-api: $(INTERNAL_PLATFORM_API_FILE) | $(ACP) update-public-api: $(INTERNAL_PLATFORM_API_FILE) | $(ACP)
@echo Copying current.txt @echo Copying current.txt
$(hide) $(ACP) $(INTERNAL_PLATFORM_API_FILE) frameworks/base/api/current.txt $(hide) $(ACP) $(INTERNAL_PLATFORM_API_FILE) frameworks/base/api/current.txt
@echo Copying removed.txt @echo Copying removed.txt
$(hide) $(ACP) $(INTERNAL_PLATFORM_REMOVED_API_FILE) frameworks/base/api/removed.txt $(hide) $(ACP) $(INTERNAL_PLATFORM_REMOVED_API_FILE) frameworks/base/api/removed.txt
update-api : update-public-api
#####################Check System API##################### #####################Check System API#####################
.PHONY: checksystemapi .PHONY: check-system-api
checkapi : check-system-api
# Check that the System API we're building hasn't broken the last-released # Check that the System API we're building hasn't broken the last-released
# SDK version. # SDK version.
@ -92,7 +99,7 @@ $(eval $(call check-api, \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \ -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 16 -error 17 -error 18 , \
cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \ cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \
checksystemapi, \ check-system-api, \
$(call doc-timestamp-for,system-api-stubs) \ $(call doc-timestamp-for,system-api-stubs) \
)) ))
@ -108,12 +115,14 @@ $(eval $(call check-api, \
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \ -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 \ -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
-error 25 -error 26 -error 27, \ -error 25 -error 26 -error 27, \
sed -e 's/%UPDATE_API%/update-system-api/g' $(BUILD_SYSTEM)/apicheck_msg_current.txt, \ cat $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
checksystemapi, \ check-system-api, \
$(call doc-timestamp-for,system-api-stubs) \ $(call doc-timestamp-for,system-api-stubs) \
)) ))
.PHONY: update-system-api .PHONY: update-system-api
update-api : update-system-api
update-system-api: $(INTERNAL_PLATFORM_SYSTEM_API_FILE) | $(ACP) update-system-api: $(INTERNAL_PLATFORM_SYSTEM_API_FILE) | $(ACP)
@echo Copying system-current.txt @echo Copying system-current.txt
$(hide) $(ACP) $(INTERNAL_PLATFORM_SYSTEM_API_FILE) frameworks/base/api/system-current.txt $(hide) $(ACP) $(INTERNAL_PLATFORM_SYSTEM_API_FILE) frameworks/base/api/system-current.txt