summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorIan Lake <ilake@google.com>2017-07-18 14:58:57 -0700
committerIan Lake <ilake@google.com>2017-07-18 15:31:08 -0700
commitc45e8809026cc8ac07278d8332da1b6622997ad0 (patch)
tree544ec15bf7f8969c692e7c3047bbd3c026fc2b53 /sample
parenta790baf13c1e2d5c4bf9035e04374b0b314e11f2 (diff)
downloadphotoviewer-c45e8809026cc8ac07278d8332da1b6622997ad0.tar.gz
Use AAPT2 for photoviewer, remove dynamic versions
Use AAPT2 for frameworks/opt/photoviewer to automatically pull in the appropriate resources. Removes the dynamic dependencies as that is now always the wrong choice. Test: make -j32 PRODUCT-sailfish-userdebug ANDROID_COMPILE_WITH_JACK=false java-dex tests BUG: 28983951 Change-Id: I9270df2eab2f46fd67f687be37a3d8798255d76f
Diffstat (limited to 'sample')
-rw-r--r--sample/Android.mk33
1 files changed, 16 insertions, 17 deletions
diff --git a/sample/Android.mk b/sample/Android.mk
index cc0d9b8..a636898 100644
--- a/sample/Android.mk
+++ b/sample/Android.mk
@@ -14,10 +14,6 @@
LOCAL_PATH:= $(call my-dir)
-#Include res dir from photoviewer
-photo_dir := ../res ../activity/res
-res_dirs := $(photo_dir) res
-
##################################################
# Build APK
include $(CLEAR_VARS)
@@ -25,42 +21,45 @@ include $(CLEAR_VARS)
src_dirs := src
LOCAL_PACKAGE_NAME := PhotoViewerSample
-LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer
-
-LOCAL_STATIC_ANDROID_LIBRARIES += android-support-v4
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+ android-support-annotations \
+ android-support-compat \
+ android-support-core-ui \
+ android-support-core-utils \
+ android-support-fragment \
+ libphotoviewer
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs)) \
$(call all-logtags-files-under, $(src_dirs))
-LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_USE_AAPT2 := true
include $(BUILD_PACKAGE)
##################################################
-
-#Include res dir from photoviewer
-photo_dir := ../res ../appcompat/res
-res_dirs := $(photo_dir) res
-
# Build APK
include $(CLEAR_VARS)
src_dirs := src
LOCAL_PACKAGE_NAME := AppcompatPhotoViewerSample
-LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer_appcompat
-
LOCAL_STATIC_ANDROID_LIBRARIES := \
+ android-support-annotations \
+ android-support-compat \
+ android-support-core-ui \
+ android-support-core-utils \
+ android-support-fragment \
+ android-support-media-compat \
android-support-v7-appcompat \
- android-support-v4
+ libphotoviewer_appcompat
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs)) \
$(call all-logtags-files-under, $(src_dirs))
-LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_USE_AAPT2 := true
include $(BUILD_PACKAGE)