Use TARGET_DEFAULT_JAVA_LIBRARIES instead of just framework.
- When raising the ProGuard sdk version for platform build, use
TARGET_DEFAULT_JAVA_LIBRARIES instead of just framework.
- Also added SUPPORT_LIBRARY_ROOT to reference support library resource
dir.
Bug: 20658265
Change-Id: Ib008d8e70508723db91431a062cac691367f2f6c
diff --git a/core/config.mk b/core/config.mk
index 3892204..c3ed00f 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -623,6 +623,13 @@
HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/sdk
HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/ndk
+# The path where app can reference the support library resources.
+ifdef TARGET_BUILD_APPS
+SUPPORT_LIBRARY_ROOT := $(HISTORICAL_SDK_VERSIONS_ROOT)/current/support
+else
+SUPPORT_LIBRARY_ROOT := frameworks/support
+endif
+
# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
# The 'current' version is whatever this source tree is.
#
diff --git a/core/java.mk b/core/java.mk
index 73b8780..66993e7 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -447,7 +447,7 @@
else
# For platform build, we can't just raise to the "current" SDK,
# that would break apps that use APIs removed from the current SDK.
- my_support_library_sdk_raise := $(call java-lib-files,framework)
+ my_support_library_sdk_raise := $(call java-lib-files,$(TARGET_DEFAULT_JAVA_LIBRARIES))
endif
endif
endif