blob: 4a9be06643b169af5d0af0cdfa03f66b388d698c [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
Mindy Pereira87763f02011-06-15 19:35:15 -070023chips_dir := ../../../frameworks/ex/chips/res
Marc Blankf4192872012-06-28 10:40:46 -070024unified_email_dir := ../UnifiedEmail
Vikram Aggarwaldaa3ed62012-10-19 13:44:22 -070025photo_dir := ../../../frameworks/opt/photoviewer/res
Yu Ping Hu9ae81e22013-03-14 19:58:21 -070026emailcommon_dir := emailcommon
Andrew Sapperstein642c6772013-05-24 10:39:28 -070027res_dir := $(chips_dir) res $(unified_email_dir)/res $(photo_dir) $(emailcommon_dir)/res
The Android Open Source Project96c5af42009-03-03 19:32:22 -080028
Jean-Baptiste Querub5a7afa2010-01-05 11:09:51 -080029LOCAL_MODULE_TAGS := optional
30
Marc Blankf4192872012-06-28 10:40:46 -070031LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src)
32LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android)
Marc Blankdc78a762011-02-14 14:39:27 -080033LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra)
Marc Blankf4192872012-06-28 10:40:46 -070034
Mindy Pereira87763f02011-06-15 19:35:15 -070035LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
Marc Blankf4192872012-06-28 10:40:46 -070036
37# Use assets dir from UnifiedEmail
38# (the default package target doesn't seem to deal with multiple asset dirs)
39LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets
40
Paul Westbrook1aa2a0f2011-10-18 17:24:00 -070041LOCAL_AAPT_FLAGS := --auto-add-overlay
Yu Ping Hu9ae81e22013-03-14 19:58:21 -070042LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips:com.android.mail:com.android.email:com.android.emailcommon:com.android.ex.photo
Mindy Pereira87763f02011-06-15 19:35:15 -070043
Yu Ping Hu9ae81e22013-03-14 19:58:21 -070044LOCAL_STATIC_JAVA_LIBRARIES := android-common com.android.emailcommon com.android.emailsync guava android-common-chips libphotoviewer
Marc Blankf4192872012-06-28 10:40:46 -070045LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
46LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
The Android Open Source Project96c5af42009-03-03 19:32:22 -080047
Marc Blankf4192872012-06-28 10:40:46 -070048LOCAL_PACKAGE_NAME := Email2
49LOCAL_OVERRIDES_PACKAGES := Email
The Android Open Source Project96c5af42009-03-03 19:32:22 -080050
Marc Blankf4192872012-06-28 10:40:46 -070051LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags
Makoto Onuki20f09c12010-03-02 14:03:08 -080052
Yu Ping Hu56732362013-08-08 10:18:59 -070053LOCAL_SDK_VERSION := 18
Guang Zhu16fe2072010-06-14 17:36:44 -070054
The Android Open Source Project96c5af42009-03-03 19:32:22 -080055include $(BUILD_PACKAGE)
56
Ying Wang37f33852011-03-01 15:56:27 -080057# only include rules to build other stuff for the original package, not the derived package.
Marc Blankdc78a762011-02-14 14:39:27 -080058ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),)
The Android Open Source Project96c5af42009-03-03 19:32:22 -080059# additionally, build unit tests in a separate .apk
60include $(call all-makefiles-under,$(LOCAL_PATH))
Marc Blankdc78a762011-02-14 14:39:27 -080061endif