blob: b2dad7af9471858d90e9749c93760c7604b65721 [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
22# Include res dir from chips, unified, 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
25photo_dir := ../../../frameworks/ex/photoviewer/res
Marc Blanke714bb92012-08-22 22:25:42 -070026res_dir := $(chips_dir) res $(unified_email_dir)/res $(photo_dir) build/res
The Android Open Source Project96c5af42009-03-03 19:32:22 -080027
Jean-Baptiste Querub5a7afa2010-01-05 11:09:51 -080028LOCAL_MODULE_TAGS := optional
29
Marc Blankf4192872012-06-28 10:40:46 -070030LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src)
31LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android)
Marc Blankdc78a762011-02-14 14:39:27 -080032LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra)
Marc Blankf4192872012-06-28 10:40:46 -070033
Mindy Pereira87763f02011-06-15 19:35:15 -070034LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
Marc Blankf4192872012-06-28 10:40:46 -070035
36# Use assets dir from UnifiedEmail
37# (the default package target doesn't seem to deal with multiple asset dirs)
38LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets
39
Paul Westbrook1aa2a0f2011-10-18 17:24:00 -070040LOCAL_AAPT_FLAGS := --auto-add-overlay
Marc Blankf4192872012-06-28 10:40:46 -070041LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips:com.android.mail:com.android.email:com.android.ex.photo
Mindy Pereira87763f02011-06-15 19:35:15 -070042
Marc Blank70edcf02012-08-21 15:21:40 -070043LOCAL_STATIC_JAVA_LIBRARIES := android-common com.android.emailcommon2 com.android.emailsync guava android-common-chips android-common-photoviewer
Marc Blankf4192872012-06-28 10:40:46 -070044LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
45LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
The Android Open Source Project96c5af42009-03-03 19:32:22 -080046
Marc Blankf4192872012-06-28 10:40:46 -070047LOCAL_PACKAGE_NAME := Email2
48LOCAL_OVERRIDES_PACKAGES := Email
The Android Open Source Project96c5af42009-03-03 19:32:22 -080049
Marc Blankf4192872012-06-28 10:40:46 -070050LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags
Makoto Onuki20f09c12010-03-02 14:03:08 -080051
Paul Westbrookf81b5402012-09-14 01:56:17 -070052LOCAL_SDK_VERSION := current # TODO change this to "17" once the MR1 sdk version is set to 17
Guang Zhu16fe2072010-06-14 17:36:44 -070053
The Android Open Source Project96c5af42009-03-03 19:32:22 -080054include $(BUILD_PACKAGE)
55
Ying Wang37f33852011-03-01 15:56:27 -080056# only include rules to build other stuff for the original package, not the derived package.
Marc Blankdc78a762011-02-14 14:39:27 -080057ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),)
The Android Open Source Project96c5af42009-03-03 19:32:22 -080058# additionally, build unit tests in a separate .apk
59include $(call all-makefiles-under,$(LOCAL_PATH))
Marc Blankdc78a762011-02-14 14:39:27 -080060endif