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 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 22 | unified_email_dir := ../UnifiedEmail |
Aurimas Liutikas | 81f896a | 2017-11-21 13:30:10 -0800 | [diff] [blame] | 23 | res_dir := res $(unified_email_dir)/res |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 24 | |
Jean-Baptiste Queru | b5a7afa | 2010-01-05 11:09:51 -0800 | [diff] [blame] | 25 | LOCAL_MODULE_TAGS := optional |
| 26 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 27 | LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src) |
| 28 | LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android) |
Paul Westbrook | bb68c13 | 2014-09-07 13:36:33 -0700 | [diff] [blame] | 29 | LOCAL_SRC_FILES += $(call all-java-files-under, provider_src/com/android) |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 30 | LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra) |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 31 | |
Mindy Pereira | 87763f0 | 2011-06-15 19:35:15 -0700 | [diff] [blame] | 32 | LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir)) |
Aurimas Liutikas | 81f896a | 2017-11-21 13:30:10 -0800 | [diff] [blame] | 33 | LOCAL_USE_AAPT2 := true |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 34 | |
| 35 | # Use assets dir from UnifiedEmail |
| 36 | # (the default package target doesn't seem to deal with multiple asset dirs) |
| 37 | LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets |
| 38 | |
Paul Westbrook | 1aa2a0f | 2011-10-18 17:24:00 -0700 | [diff] [blame] | 39 | LOCAL_AAPT_FLAGS := --auto-add-overlay |
Aurimas Liutikas | 81f896a | 2017-11-21 13:30:10 -0800 | [diff] [blame] | 40 | LOCAL_AAPT_FLAGS += --extra-packages com.android.mail:com.android.email:com.android.emailcommon |
Mindy Pereira | 87763f0 | 2011-06-15 19:35:15 -0700 | [diff] [blame] | 41 | |
Aurimas Liutikas | 81f896a | 2017-11-21 13:30:10 -0800 | [diff] [blame] | 42 | LOCAL_STATIC_ANDROID_LIBRARIES := \ |
| 43 | com.android.emailcommon \ |
| 44 | libchips \ |
| 45 | libphotoviewer_appcompat \ |
| 46 | android-opt-bitmap \ |
| 47 | android-opt-datetimepicker \ |
Aurimas Liutikas | 35152d3 | 2018-04-09 16:33:15 -0700 | [diff] [blame] | 48 | androidx.core_core \ |
| 49 | androidx.media_media \ |
| 50 | androidx.legacy_legacy-support-core-utils \ |
| 51 | androidx.legacy_legacy-support-core-ui \ |
| 52 | androidx.fragment_fragment \ |
| 53 | androidx.appcompat_appcompat \ |
| 54 | androidx.gridlayout_gridlayout \ |
| 55 | androidx.legacy_legacy-support-v13 |
Aurimas Liutikas | 81f896a | 2017-11-21 13:30:10 -0800 | [diff] [blame] | 56 | |
| 57 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Aurimas Liutikas | 35152d3 | 2018-04-09 16:33:15 -0700 | [diff] [blame] | 58 | androidx.annotation_annotation \ |
Aurimas Liutikas | 81f896a | 2017-11-21 13:30:10 -0800 | [diff] [blame] | 59 | android-common \ |
| 60 | guava \ |
| 61 | owasp-html-sanitizer |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 62 | |
Narayan Kamath | f8f1eac | 2014-12-12 11:38:19 +0000 | [diff] [blame] | 63 | LOCAL_JAVA_LIBRARIES := org.apache.http.legacy |
| 64 | |
Paul Westbrook | 2127d4d | 2013-08-15 18:12:40 -0700 | [diff] [blame] | 65 | LOCAL_PACKAGE_NAME := Email |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 66 | |
Anton Hansson | 8506bd1 | 2019-01-11 14:53:28 +0000 | [diff] [blame] | 67 | LOCAL_PRODUCT_MODULE := true |
| 68 | |
Marc Blank | f419287 | 2012-06-28 10:40:46 -0700 | [diff] [blame] | 69 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags |
Paul Westbrook | 2fb24a2 | 2014-08-01 10:53:36 -0700 | [diff] [blame] | 70 | ifeq (eng,$(TARGET_BUILD_VARIANT)) |
| 71 | LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags |
| 72 | endif |
Makoto Onuki | 20f09c1 | 2010-03-02 14:03:08 -0800 | [diff] [blame] | 73 | |
Alon Albert | 4927a24 | 2013-11-05 17:54:30 -0800 | [diff] [blame] | 74 | LOCAL_SDK_VERSION := current |
Guang Zhu | 16fe207 | 2010-06-14 17:36:44 -0700 | [diff] [blame] | 75 | |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 76 | include $(BUILD_PACKAGE) |
| 77 | |
Ying Wang | 37f3385 | 2011-03-01 15:56:27 -0800 | [diff] [blame] | 78 | # 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] | 79 | ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),) |
The Android Open Source Project | 96c5af4 | 2009-03-03 19:32:22 -0800 | [diff] [blame] | 80 | # additionally, build unit tests in a separate .apk |
| 81 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Marc Blank | dc78a76 | 2011-02-14 14:39:27 -0800 | [diff] [blame] | 82 | endif |