Add explicit support library prebuilts targets
We won't be updating prebuilts/sdk. Apps need to move to fullsdk if they
need a current prebuilt version of the support library.
Test: make
Test: make ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I122ff2cd06daed673c9c2f6413c305cce0230e58
diff --git a/current/Android.mk b/current/Android.mk
index 11b4f96..acddb1f 100644
--- a/current/Android.mk
+++ b/current/Android.mk
@@ -18,7 +18,9 @@
#########################################
# The prebuilt support libraries.
-# Only needed for unbundled build.
+
+# For apps (unbundled) build, replace the typical
+# make target artifacts with prebuilts.
ifneq ($(TARGET_BUILD_APPS),)
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
@@ -26,3 +28,14 @@
$(shell find $(LOCAL_PATH)/support -name "*.jar"))
include $(BUILD_MULTI_PREBUILT)
endif # TARGET_BUILD_APPS not empty
+
+# Also set up explicit prebuilts for use in apps.
+include $(CLEAR_VARS)
+SUPPORT_LIBS := \
+ $(patsubst $(LOCAL_PATH)/%,%,\
+ $(shell find $(LOCAL_PATH)/support -name "*.jar"))
+LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
+ $(foreach lib,$(SUPPORT_LIBS),\
+ $(basename $(notdir $(lib)))-prebuilt:$(lib))
+SUPPORT_LIBS :=
+include $(BUILD_MULTI_PREBUILT)