1#  Copyright (C) 2015 The Android Open Source Project
2#
3#  Licensed under the Apache License, Version 2.0 (the "License");
4#  you may not use this file except in compliance with the License.
5#  You may obtain a copy of the License at
6#
7#       http://www.apache.org/licenses/LICENSE-2.0
8#
9#  Unless required by applicable law or agreed to in writing, software
10#  distributed under the License is distributed on an "AS IS" BASIS,
11#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12#  See the License for the specific language governing permissions and
13#  limitations under the License.
14LOCAL_PATH:= $(call my-dir)
15
16include $(CLEAR_VARS)
17
18LOCAL_MODULE_TAGS := optional
19
20LOCAL_SRC_FILES := $(call all-java-files-under, src)
21
22LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
23ifeq ($(TARGET_BUILD_APPS),)
24    LOCAL_RESOURCE_DIR += frameworks/support/v7/appcompat/res
25    LOCAL_RESOURCE_DIR += frameworks/support/v7/recyclerview/res
26else
27    LOCAL_RESOURCE_DIR += prebuilts/sdk/current/support/v7/appcompat/res
28    LOCAL_RESOURCE_DIR += prebuilts/sdk/current/support/v7/recyclerview/res
29endif
30LOCAL_RESOURCE_DIR += frameworks/opt/chips/res
31LOCAL_RESOURCE_DIR += frameworks/opt/colorpicker/res
32LOCAL_RESOURCE_DIR += frameworks/opt/photoviewer/res
33LOCAL_RESOURCE_DIR += frameworks/opt/photoviewer/activity/res
34
35LOCAL_STATIC_JAVA_LIBRARIES := android-common
36LOCAL_STATIC_JAVA_LIBRARIES += android-common-framesequence
37LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
38LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
39LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-palette
40LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-recyclerview
41LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
42LOCAL_STATIC_JAVA_LIBRARIES += com.android.vcard
43LOCAL_STATIC_JAVA_LIBRARIES += guava
44LOCAL_STATIC_JAVA_LIBRARIES += libchips
45LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer
46LOCAL_STATIC_JAVA_LIBRARIES += libphonenumber
47LOCAL_STATIC_JAVA_LIBRARIES += colorpicker
48
49include $(LOCAL_PATH)/version.mk
50
51LOCAL_AAPT_FLAGS := --auto-add-overlay
52LOCAL_AAPT_FLAGS += --version-name "$(version_name_package)"
53LOCAL_AAPT_FLAGS += --version-code $(version_code_package)
54LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat
55LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.recyclerview
56LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips
57LOCAL_AAPT_FLAGS += --extra-packages com.android.vcard
58LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.photo
59LOCAL_AAPT_FLAGS += --extra-packages com.android.colorpicker
60
61ifdef TARGET_BUILD_APPS
62    LOCAL_JNI_SHARED_LIBRARIES := libframesequence libgiftranscode
63else
64    LOCAL_REQUIRED_MODULES:= libframesequence libgiftranscode
65endif
66
67LOCAL_PROGUARD_FLAGS := -ignorewarnings
68
69LOCAL_PROGUARD_ENABLED := nosystem
70
71LOCAL_PROGUARD_FLAG_FILES := ../../../build/core/proguard_basic_keeps.flags proguard.flags
72ifeq (eng,$(TARGET_BUILD_VARIANT))
73    LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
74else
75    LOCAL_PROGUARD_FLAG_FILES += proguard-release.flags
76endif
77
78LOCAL_PACKAGE_NAME := messaging
79
80LOCAL_CERTIFICATE := platform
81
82LOCAL_SDK_VERSION := current
83
84include $(BUILD_PACKAGE)
85
86include $(call all-makefiles-under, $(LOCAL_PATH))
87