platform_build/core/sdk_check.mk
Anton Hansson 7ff32d2734 Add support for LOCAL_PRIVATE_PLATFORM_APIS.
The only enforcement right now is that modules don't specify both
LOCAL_SDK_VERSION and LOCAL_PRIVATE_PLATFORM_APIS, but a warning
can be turned on by setting the JAVA_SDK_ENFORCEMENT_WARNING variable.

Bug: 73535841
Test: make w/ and wo/ flag.
Change-Id: I3cc720bf060e2bc789e10884ff888d527b91cb50
2018-02-21 18:10:59 +00:00

14 lines
672 B
Makefile

# Enforcement checks that LOCAL_SDK_VERSION and LOCAL_PRIVATE_PLATFORM_APIS are
# set correctly.
# Should be included by java targets that allow specifying LOCAL_SDK_VERSION.
ifeq ($(LOCAL_SDK_VERSION)$(LOCAL_PRIVATE_PLATFORM_APIS),)
ifneq ($(JAVA_SDK_ENFORCEMENT_WARNING),)
$(warning Java modules must specify LOCAL_SDK_VERSION or LOCAL_PRIVATE_PLATFORM_APIS, but $(LOCAL_MODULE) specifies neither.)
endif
else ifneq ($(LOCAL_SDK_VERSION),)
ifneq ($(LOCAL_PRIVATE_PLATFORM_APIS),)
$(error $(LOCAL_MODULE) specifies both LOCAL_SDK_VERSION ($(LOCAL_SDK_VERSION)) and LOCAL_PRIVATE_PLATFORM_APIS ($(LOCAL_PRIVATE_PLATFORM_APIS)), but should specify only one.)
endif
endif