forked from openkylin/platform_build
Let apicheck check both the public API and system API.
Also "make update-api" updates both public API and system API files. Bug: 18960664 Change-Id: I35e805816e07c8aa4deaeb84b1611923583325e1
This commit is contained in:
parent
961096fada
commit
668ae2506b
|
@ -7,7 +7,7 @@ To make these errors go away, you have two choices:
|
|||
errors above.
|
||||
|
||||
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,
|
||||
you will need approval.
|
||||
|
|
|
@ -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.
|
||||
# Note that since INTERNAL_PLATFORM_API_FILE is the byproduct of api-stubs module,
|
||||
# (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
|
||||
# SDK version.
|
||||
$(eval $(call check-api, \
|
||||
checkapi-last, \
|
||||
checkpublicapi-last, \
|
||||
$(SRC_API_DIR)/$(last_released_sdk_version).txt, \
|
||||
$(INTERNAL_PLATFORM_API_FILE), \
|
||||
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 16 -error 17 -error 18 , \
|
||||
cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \
|
||||
checkapi, \
|
||||
check-public-api, \
|
||||
$(call doc-timestamp-for,api-stubs) \
|
||||
))
|
||||
|
||||
# Check that the API we're building hasn't changed from the not-yet-released
|
||||
# SDK version.
|
||||
$(eval $(call check-api, \
|
||||
checkapi-current, \
|
||||
checkpublicapi-current, \
|
||||
frameworks/base/api/current.txt, \
|
||||
$(INTERNAL_PLATFORM_API_FILE), \
|
||||
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 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
|
||||
-error 25 -error 26 -error 27, \
|
||||
sed -e 's/%UPDATE_API%/update-api/g' $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
|
||||
checkapi, \
|
||||
cat $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
|
||||
check-public-api, \
|
||||
$(call doc-timestamp-for,api-stubs) \
|
||||
))
|
||||
|
||||
.PHONY: update-api
|
||||
update-api: $(INTERNAL_PLATFORM_API_FILE) | $(ACP)
|
||||
.PHONY: update-public-api
|
||||
update-public-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
|
||||
|
||||
update-api : update-public-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
|
||||
# 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 16 -error 17 -error 18 , \
|
||||
cat $(BUILD_SYSTEM)/apicheck_msg_last.txt, \
|
||||
checksystemapi, \
|
||||
check-system-api, \
|
||||
$(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 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
|
||||
-error 25 -error 26 -error 27, \
|
||||
sed -e 's/%UPDATE_API%/update-system-api/g' $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
|
||||
checksystemapi, \
|
||||
cat $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
|
||||
check-system-api, \
|
||||
$(call doc-timestamp-for,system-api-stubs) \
|
||||
))
|
||||
|
||||
.PHONY: update-system-api
|
||||
update-api : update-system-api
|
||||
|
||||
update-system-api: $(INTERNAL_PLATFORM_SYSTEM_API_FILE) | $(ACP)
|
||||
@echo Copying system-current.txt
|
||||
$(hide) $(ACP) $(INTERNAL_PLATFORM_SYSTEM_API_FILE) frameworks/base/api/system-current.txt
|
||||
|
|
Loading…
Reference in New Issue