platform_build/core/local_vsdk.mk
Sundong Ahn 5a44d1f069 Add LOCAL_SDK_VERSION := system_$(VER)
The system_$(VER) can be set in LOCAL_SDK_VERSION, and the apk will use
android_system.jar at build time.
If LOCAL_SDK_VERSION is not defined and this module is installed in
vendor.img, LOCAL_SDK_VERSION is set to system_current.

Bug: 67724799
Test: 1. build && run on taimen
2. LOCAL_SDK_VERSION:=system_27 in ims.apk && build ims.apk && check
the vsdk_v27_intermediates.

Merged-In: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
Change-Id: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
(cherry picked from commit ef212cbe8d)
2017-12-01 00:39:07 +00:00

19 lines
677 B
Makefile

ifdef BOARD_VSDK_VERSION
# Set LOCAL_SDK_VERSION to system_current, If LOCAL_SDK_VERSION is not defined and LOCAL_VENDOR_MODULE is true
_is_vendor_app :=
ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_OEM_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
_is_vendor_app := true
else
ifneq (,$(filter $(TARGET_OUT_VENDOR)%,$(LOCAL_MODULE_PATH) $(LOCAL_MODULE_PATH_32) $(LOCAL_MODULE_PATH_64)))
_is_vendor_app := true
endif
endif
ifneq (,$(filter JAVA_LIBRARIES APPS,$(LOCAL_MODULE_CLASS)))
ifndef LOCAL_SDK_VERSION
ifeq ($(_is_vendor_app),true)
LOCAL_SDK_VERSION := system_current
endif
endif
endif
endif