From 8902f5505fc6483b91a4191dab56be6de0aa7710 Mon Sep 17 00:00:00 2001 From: Sundong Ahn Date: Thu, 8 Feb 2018 11:25:59 +0900 Subject: [PATCH] Change the naming policy of system_$(VER) The name of system_$(VER) prebuilt file in droiddoc.mk and java_common.mk was changed to sdk_v$(LOCAL_SDK_VERSION). But system_$(VER) in apidiff.mk is not changed, since apidiff.mk file is not in AOSP. So this modify is added and the modify for core_current is added. Bug: 72031391 Test: build & run on taimen Change-Id: Ie227f4c6911fc80484f12b3f1cfa6472cb605d4b --- core/apidiff.mk | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/core/apidiff.mk b/core/apidiff.mk index 6fd94a2a4..36d75fe38 100644 --- a/core/apidiff.mk +++ b/core/apidiff.mk @@ -57,18 +57,12 @@ ifneq ($(LOCAL_SDK_VERSION),) LOCAL_JAVA_LIBRARIES := android_test_stubs_current $(LOCAL_JAVA_LIBRARIES) $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, android_test_stubs_current) else - ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION))) - ifeq (,$(TARGET_BUILD_APPS)) - LOCAL_JAVA_LIBRARIES := system_sdk_v$(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION)) $(LOCAL_JAVA_LIBRARIES) - $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, system_sdk_v$(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))) - else - LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES) - $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION)) - endif - else - LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES) - $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION)) - endif + # core_ is subset of . Instead of defining a prebuilt lib for core_, + # use the stub for when building for apps. + _version := $(patsubst core_%,%,$(LOCAL_SDK_VERSION)) + LOCAL_JAVA_LIBRARIES := sdk_v$(_version) $(LOCAL_JAVA_LIBRARIES) + $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(_version)) + _version := endif else LOCAL_JAVA_LIBRARIES := core-oj core-libart ext framework $(LOCAL_JAVA_LIBRARIES)