summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-10-30 12:22:20 -0700
committerYorke Lee <yorkelee@google.com>2015-10-30 12:22:20 -0700
commita20df31aea1581c0228cd8efe838bd31c6163ee7 (patch)
tree9e1910509a48286ef07e2ab394cff0fe9f77c884
parent5a50b524653ebcd48ff5df0957adbb7525a197f0 (diff)
Build against prebuilt support library resources in unbundled builds
Build entirely against the prebuilt support library to avoid resources getting out of sync. Change-Id: I2ce172b54b63d6749a5a260085788fefd0a5f543
-rw-r--r--Android.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/Android.mk b/Android.mk
index 0d7754c3e..bd0c9dec2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -7,6 +7,12 @@ incallui_dir := ../InCallUI
contacts_common_dir := ../ContactsCommon
phone_common_dir := ../PhoneCommon
+ifeq ($(TARGET_BUILD_APPS),)
+support_library_root_dir := frameworks/support
+else
+support_library_root_dir := prebuilts/sdk/current/support
+endif
+
src_dirs := src \
$(incallui_dir)/src \
$(contacts_common_dir)/src \
@@ -19,10 +25,10 @@ res_dirs := res \
LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) \
- frameworks/support/v7/appcompat/res \
- frameworks/support/v7/cardview/res \
- frameworks/support/v7/recyclerview/res \
- frameworks/support/design/res
+ $(support_library_root_dir)/v7/cardview/res \
+ $(support_library_root_dir)/v7/recyclerview/res \
+ $(support_library_root_dir)/v7/appcompat/res \
+ $(support_library_root_dir)/design/res
LOCAL_AAPT_FLAGS := \
--auto-add-overlay \