From 07fbf1025f3dc5007046a9f13aeb577ef831a8a6 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 10 Apr 2018 16:16:33 +0100 Subject: [PATCH] Update apidiff.mk to use the sdk-name macro. This internal change complements aosp/661901, which introduced the sdk module name macro. apidiff.mk doesn't exist in aosp. Bug: 77525052 Test: make droid Change-Id: Ia347d8ffef1a7d28508256b4a5c984b3e07ed998 (cherry picked from commit d4e657a2277c3c8491be145a87f69c7572e181b6) --- core/apidiff.mk | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/apidiff.mk b/core/apidiff.mk index 36d75fe38b..180aabd6ca 100644 --- a/core/apidiff.mk +++ b/core/apidiff.mk @@ -57,12 +57,11 @@ 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 - # 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 := + # TARGET_BUILD_APPS is set. Use the modules defined in prebuilts/sdk/Android.mk. + _module_name := $(call resolve-prebuilt-sdk-module,$(LOCAL_SDK_VERSION)) + LOCAL_JAVA_LIBRARIES := $(_module_name) $(LOCAL_JAVA_LIBRARIES) + $(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, $(_module_name)) + _module_name := endif else LOCAL_JAVA_LIBRARIES := core-oj core-libart ext framework $(LOCAL_JAVA_LIBRARIES)