Support to build against prebuilt current SDK in unbundled branch
Bug: 6465084
With this change and prebuilt current SDK checked in, you can build
unbundled apps with LOCAL_SDK_VERSION current in an unbundled branch.
Change-Id: I4efcee611d08a3a903bd6bf5a80de11500564206
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index 47f599d..e312965 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -64,7 +64,8 @@
ifneq ($(LOCAL_IS_HOST_MODULE),true)
ifneq ($(LOCAL_SDK_VERSION),)
- ifeq ($(LOCAL_SDK_VERSION),current)
+ ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
+ # Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
else
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)