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 |
Andrew Sapperstein | 05a96bd | 2014-07-31 15:12:55 -0700 | [diff] [blame] | 23 | appcompat_dir := ../../../prebuilts/sdk/current/support/v7/appcompat/res |
Scott Kennedy | e9c8ffa | 2014-03-21 14:24:51 -0700 | [diff] [blame] | 24 | chips_dir := ../../../frameworks/opt/chips/res |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 25 | unified_email_dir := ../UnifiedEmail |
Andrew Sapperstein | a3341c3 | 2014-08-19 13:57:33 -0700 | [diff] [blame] | 26 | photo_dir := ../../../frameworks/opt/photoviewer/res ../../../frameworks/opt/photoviewer/appcompat/res |
Yu Ping Hu | 9ae81e2 | 2013-03-14 19:58:21 -0700 | [diff] [blame] | 27 | emailcommon_dir := emailcommon |
Paul Westbrook | f1212d4 | 2014-07-16 11:46:01 +0200 | [diff] [blame] | 28 | gridlayout_dir := ../../../prebuilts/sdk/current/support/v7/gridlayout/res |
James Lemieux | 89febdf | 2014-07-11 14:24:42 -0700 | [diff] [blame] | 29 | bitmap_dir := ../../../frameworks/opt/bitmap/res |
Andrew Sapperstein | c2abe30 | 2013-10-21 18:41:30 -0700 | [diff] [blame] | 30 | datetimepicker_dir := ../../../frameworks/opt/datetimepicker/res |
Andrew Sapperstein | 05a96bd | 2014-07-31 15:12:55 -0700 | [diff] [blame] | 31 | res_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 Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 32 | |
Jean-Baptiste Queru | b5a7afa | 2010-01-05 11:09:51 -0800 | [diff] [blame] | 33 | LOCAL_MODULE_TAGS := optional |
| 34 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 35 | LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src) |
| 36 | LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android) |
Paul Westbrook | bb68c13 | 2014-09-07 13:36:33 -0700 | [diff] [blame] | 37 | LOCAL_SRC_FILES += $(call all-java-files-under, provider_src/com/android) |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 38 | LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra) |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 39 | |
Mindy Pereira | 87763f0 | 2011-06-15 19:35:15 -0700 | [diff] [blame] | 40 | LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir)) |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 41 | |
| 42 | # Use assets dir from UnifiedEmail |
| 43 | # (the default package target doesn't seem to deal with multiple asset dirs) |
| 44 | LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets |
| 45 | |
Paul Westbrook | 1aa2a0f | 2011-10-18 17:24:00 -0700 | [diff] [blame] | 46 | LOCAL_AAPT_FLAGS := --auto-add-overlay |
Andrew Sapperstein | 05a96bd | 2014-07-31 15:12:55 -0700 | [diff] [blame] | 47 | LOCAL_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 Pereira | 87763f0 | 2011-06-15 19:35:15 -0700 | [diff] [blame] | 48 | |
Andrew Sapperstein | a3341c3 | 2014-08-19 13:57:33 -0700 | [diff] [blame] | 49 | LOCAL_STATIC_JAVA_LIBRARIES := android-common com.android.emailcommon guava libchips |
| 50 | LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer_appcompat |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 51 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4 |
Andrew Sapperstein | 05a96bd | 2014-07-31 15:12:55 -0700 | [diff] [blame] | 52 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat |
Andrew Sapperstein | 2c56354 | 2013-08-27 17:40:28 -0700 | [diff] [blame] | 53 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-gridlayout |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 54 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13 |
James Lemieux | 89febdf | 2014-07-11 14:24:42 -0700 | [diff] [blame] | 55 | LOCAL_STATIC_JAVA_LIBRARIES += android-opt-bitmap |
Andrew Sapperstein | c2abe30 | 2013-10-21 18:41:30 -0700 | [diff] [blame] | 56 | LOCAL_STATIC_JAVA_LIBRARIES += android-opt-datetimepicker |
Tony Mantler | 8b801e9 | 2014-05-22 13:16:38 -0700 | [diff] [blame] | 57 | LOCAL_STATIC_JAVA_LIBRARIES += owasp-html-sanitizer |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 58 | |
Paul Westbrook | 2127d4d | 2013-08-15 18:12:40 -0700 | [diff] [blame] | 59 | LOCAL_PACKAGE_NAME := Email |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 60 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 61 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags |
Paul Westbrook | 2fb24a2 | 2014-08-01 10:53:36 -0700 | [diff] [blame] | 62 | ifeq (eng,$(TARGET_BUILD_VARIANT)) |
| 63 | LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags |
| 64 | endif |
Makoto Onuki | 20f09c1 | 2010-03-02 14:03:08 -0800 | [diff] [blame] | 65 | |
Alon Albert | 4927a24 | 2013-11-05 17:54:30 -0800 | [diff] [blame] | 66 | LOCAL_SDK_VERSION := current |
Guang Zhu | 16fe207 | 2010-06-14 17:36:44 -0700 | [diff] [blame] | 67 | |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 68 | include $(BUILD_PACKAGE) |
| 69 | |
Ying Wang | 37f3385 | 2011-03-01 15:56:27 -0800 | [diff] [blame] | 70 | # 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] | 71 | ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),) |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 72 | # additionally, build unit tests in a separate .apk |
| 73 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 74 | endif |