The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 1 | # 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 Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 17 | # Build the Email application itself, along with its tests and tests for the emailcommon |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 18 | # static library. All tests can be run via runtest email |
| 19 | |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 20 | include $(CLEAR_VARS) |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 21 | |
Yu Ping Hu | 9ae81e2 | 2013-03-14 19:58:21 -0700 | [diff] [blame] | 22 | # Include res dir from chips, unified, emailcommon, and photoviewer |
Mindy Pereira | 87763f0 | 2011-06-15 19:35:15 -0700 | [diff] [blame] | 23 | chips_dir := ../../../frameworks/ex/chips/res |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 24 | unified_email_dir := ../UnifiedEmail |
Vikram Aggarwal | daa3ed6 | 2012-10-19 13:44:22 -0700 | [diff] [blame] | 25 | photo_dir := ../../../frameworks/opt/photoviewer/res |
Yu Ping Hu | 9ae81e2 | 2013-03-14 19:58:21 -0700 | [diff] [blame] | 26 | emailcommon_dir := emailcommon |
| 27 | res_dir := $(chips_dir) res $(unified_email_dir)/res $(photo_dir) $(emailcommon_dir)/res build/res |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 28 | |
Jean-Baptiste Queru | b5a7afa | 2010-01-05 11:09:51 -0800 | [diff] [blame] | 29 | LOCAL_MODULE_TAGS := optional |
| 30 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 31 | LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src) |
| 32 | LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android) |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 33 | LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra) |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 34 | |
Mindy Pereira | 87763f0 | 2011-06-15 19:35:15 -0700 | [diff] [blame] | 35 | LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir)) |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 36 | |
| 37 | # Use assets dir from UnifiedEmail |
| 38 | # (the default package target doesn't seem to deal with multiple asset dirs) |
| 39 | LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets |
| 40 | |
Paul Westbrook | 1aa2a0f | 2011-10-18 17:24:00 -0700 | [diff] [blame] | 41 | LOCAL_AAPT_FLAGS := --auto-add-overlay |
Yu Ping Hu | 9ae81e2 | 2013-03-14 19:58:21 -0700 | [diff] [blame] | 42 | LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips:com.android.mail:com.android.email:com.android.emailcommon:com.android.ex.photo |
Mindy Pereira | 87763f0 | 2011-06-15 19:35:15 -0700 | [diff] [blame] | 43 | |
Yu Ping Hu | 9ae81e2 | 2013-03-14 19:58:21 -0700 | [diff] [blame] | 44 | LOCAL_STATIC_JAVA_LIBRARIES := android-common com.android.emailcommon com.android.emailsync guava android-common-chips libphotoviewer |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 45 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4 |
| 46 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13 |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 47 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 48 | LOCAL_PACKAGE_NAME := Email2 |
| 49 | LOCAL_OVERRIDES_PACKAGES := Email |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 50 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 51 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags |
Makoto Onuki | 20f09c1 | 2010-03-02 14:03:08 -0800 | [diff] [blame] | 52 | |
Paul Westbrook | 1bc34c4 | 2013-03-05 09:45:59 -0800 | [diff] [blame] | 53 | LOCAL_SDK_VERSION := 17 |
Guang Zhu | 16fe207 | 2010-06-14 17:36:44 -0700 | [diff] [blame] | 54 | |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 55 | include $(BUILD_PACKAGE) |
| 56 | |
Ying Wang | 37f3385 | 2011-03-01 15:56:27 -0800 | [diff] [blame] | 57 | # only include rules to build other stuff for the original package, not the derived package. |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 58 | ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),) |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 59 | # additionally, build unit tests in a separate .apk |
| 60 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 61 | endif |