blob: b6a4bd90d8002c53d4f288a9853345daa9064f1e [file] [log] [blame]
The Android Open Source Project96c5af42009-03-03 19:32:22 -08001# Copyright 2008, 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.
14
Marc Blankdc78a762011-02-14 14:39:27 -080015LOCAL_PATH := $(call my-dir)
16
Marc Blankf4192872012-06-28 10:40:46 -070017# Build the Email application itself, along with its tests and tests for the emailcommon
Marc Blankdc78a762011-02-14 14:39:27 -080018# static library. All tests can be run via runtest email
19
The Android Open Source Project96c5af42009-03-03 19:32:22 -080020include $(CLEAR_VARS)
Marc Blankf4192872012-06-28 10:40:46 -070021
Yu Ping Hu9ae81e22013-03-14 19:58:21 -070022# Include res dir from chips, unified, emailcommon, and photoviewer
Ying Wang083af062015-05-19 16:10:17 -070023appcompat_dir := ../../../$(SUPPORT_LIBRARY_ROOT)/v7/appcompat/res
Scott Kennedye9c8ffa2014-03-21 14:24:51 -070024chips_dir := ../../../frameworks/opt/chips/res
Marc Blankf4192872012-06-28 10:40:46 -070025unified_email_dir := ../UnifiedEmail
Andrew Sappersteina3341c32014-08-19 13:57:33 -070026photo_dir := ../../../frameworks/opt/photoviewer/res ../../../frameworks/opt/photoviewer/appcompat/res
Yu Ping Hu9ae81e22013-03-14 19:58:21 -070027emailcommon_dir := emailcommon
Ying Wang083af062015-05-19 16:10:17 -070028gridlayout_dir := ../../../$(SUPPORT_LIBRARY_ROOT)/v7/gridlayout/res
James Lemieux89febdf2014-07-11 14:24:42 -070029bitmap_dir := ../../../frameworks/opt/bitmap/res
Andrew Sappersteinc2abe302013-10-21 18:41:30 -070030datetimepicker_dir := ../../../frameworks/opt/datetimepicker/res
Andrew Sapperstein05a96bd2014-07-31 15:12:55 -070031res_dir := res $(unified_email_dir)/res $(chips_dir) $(photo_dir) $(emailcommon_dir)/res $(appcompat_dir) $(gridlayout_dir) $(bitmap_dir) $(datetimepicker_dir)
The Android Open Source Project96c5af42009-03-03 19:32:22 -080032
Jean-Baptiste Querub5a7afa2010-01-05 11:09:51 -080033LOCAL_MODULE_TAGS := optional
34
Marc Blankf4192872012-06-28 10:40:46 -070035LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src)
36LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android)
Paul Westbrookbb68c132014-09-07 13:36:33 -070037LOCAL_SRC_FILES += $(call all-java-files-under, provider_src/com/android)
Marc Blankdc78a762011-02-14 14:39:27 -080038LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra)
Marc Blankf4192872012-06-28 10:40:46 -070039
Mindy Pereira87763f02011-06-15 19:35:15 -070040LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
Marc Blankf4192872012-06-28 10:40:46 -070041
42# Use assets dir from UnifiedEmail
43# (the default package target doesn't seem to deal with multiple asset dirs)
44LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets
45
Paul Westbrook1aa2a0f2011-10-18 17:24:00 -070046LOCAL_AAPT_FLAGS := --auto-add-overlay
Andrew Sapperstein05a96bd2014-07-31 15:12:55 -070047LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips:com.android.mail:com.android.email:com.android.emailcommon:com.android.ex.photo:android.support.v7.appcompat:android.support.v7.gridlayout:com.android.bitmap:com.android.datetimepicker
Mindy Pereira87763f02011-06-15 19:35:15 -070048
Andrew Sappersteina3341c32014-08-19 13:57:33 -070049LOCAL_STATIC_JAVA_LIBRARIES := android-common com.android.emailcommon guava libchips
50LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer_appcompat
Marc Blankf4192872012-06-28 10:40:46 -070051LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
Andrew Sapperstein05a96bd2014-07-31 15:12:55 -070052LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
Andrew Sapperstein2c563542013-08-27 17:40:28 -070053LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-gridlayout
Marc Blankf4192872012-06-28 10:40:46 -070054LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
James Lemieux89febdf2014-07-11 14:24:42 -070055LOCAL_STATIC_JAVA_LIBRARIES += android-opt-bitmap
Andrew Sappersteinc2abe302013-10-21 18:41:30 -070056LOCAL_STATIC_JAVA_LIBRARIES += android-opt-datetimepicker
Tony Mantler8b801e92014-05-22 13:16:38 -070057LOCAL_STATIC_JAVA_LIBRARIES += owasp-html-sanitizer
The Android Open Source Project96c5af42009-03-03 19:32:22 -080058
Narayan Kamathf8f1eac2014-12-12 11:38:19 +000059LOCAL_JAVA_LIBRARIES := org.apache.http.legacy
60
Paul Westbrook2127d4d2013-08-15 18:12:40 -070061LOCAL_PACKAGE_NAME := Email
The Android Open Source Project96c5af42009-03-03 19:32:22 -080062
Marc Blankf4192872012-06-28 10:40:46 -070063LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags
Paul Westbrook2fb24a22014-08-01 10:53:36 -070064ifeq (eng,$(TARGET_BUILD_VARIANT))
65 LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
66endif
Makoto Onuki20f09c12010-03-02 14:03:08 -080067
Alon Albert4927a242013-11-05 17:54:30 -080068LOCAL_SDK_VERSION := current
Guang Zhu16fe2072010-06-14 17:36:44 -070069
The Android Open Source Project96c5af42009-03-03 19:32:22 -080070include $(BUILD_PACKAGE)
71
Ying Wang37f33852011-03-01 15:56:27 -080072# only include rules to build other stuff for the original package, not the derived package.
Marc Blankdc78a762011-02-14 14:39:27 -080073ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),)
The Android Open Source Project96c5af42009-03-03 19:32:22 -080074# additionally, build unit tests in a separate .apk
75include $(call all-makefiles-under,$(LOCAL_PATH))
Marc Blankdc78a762011-02-14 14:39:27 -080076endif