blob: c354471bd1a1184caf7058499753892efdee0ac0 [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
Marc Blankf4192872012-06-28 10:40:46 -070022unified_email_dir := ../UnifiedEmail
Aurimas Liutikas81f896a2017-11-21 13:30:10 -080023res_dir := res $(unified_email_dir)/res
The Android Open Source Project96c5af42009-03-03 19:32:22 -080024
Jean-Baptiste Querub5a7afa2010-01-05 11:09:51 -080025LOCAL_MODULE_TAGS := optional
26
Marc Blankf4192872012-06-28 10:40:46 -070027LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src)
28LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android)
Paul Westbrookbb68c132014-09-07 13:36:33 -070029LOCAL_SRC_FILES += $(call all-java-files-under, provider_src/com/android)
Marc Blankdc78a762011-02-14 14:39:27 -080030LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra)
Marc Blankf4192872012-06-28 10:40:46 -070031
Mindy Pereira87763f02011-06-15 19:35:15 -070032LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
Aurimas Liutikas81f896a2017-11-21 13:30:10 -080033LOCAL_USE_AAPT2 := true
Marc Blankf4192872012-06-28 10:40:46 -070034
35# Use assets dir from UnifiedEmail
36# (the default package target doesn't seem to deal with multiple asset dirs)
37LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets
38
Paul Westbrook1aa2a0f2011-10-18 17:24:00 -070039LOCAL_AAPT_FLAGS := --auto-add-overlay
Aurimas Liutikas81f896a2017-11-21 13:30:10 -080040LOCAL_AAPT_FLAGS += --extra-packages com.android.mail:com.android.email:com.android.emailcommon
Mindy Pereira87763f02011-06-15 19:35:15 -070041
Aurimas Liutikas81f896a2017-11-21 13:30:10 -080042LOCAL_STATIC_ANDROID_LIBRARIES := \
43 com.android.emailcommon \
44 libchips \
45 libphotoviewer_appcompat \
46 android-opt-bitmap \
47 android-opt-datetimepicker \
Aurimas Liutikas35152d32018-04-09 16:33:15 -070048 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 Liutikas81f896a2017-11-21 13:30:10 -080056
57LOCAL_STATIC_JAVA_LIBRARIES := \
Aurimas Liutikas35152d32018-04-09 16:33:15 -070058 androidx.annotation_annotation \
Aurimas Liutikas81f896a2017-11-21 13:30:10 -080059 android-common \
60 guava \
61 owasp-html-sanitizer
The Android Open Source Project96c5af42009-03-03 19:32:22 -080062
Narayan Kamathf8f1eac2014-12-12 11:38:19 +000063LOCAL_JAVA_LIBRARIES := org.apache.http.legacy
64
Paul Westbrook2127d4d2013-08-15 18:12:40 -070065LOCAL_PACKAGE_NAME := Email
The Android Open Source Project96c5af42009-03-03 19:32:22 -080066
Anton Hansson8506bd12019-01-11 14:53:28 +000067LOCAL_PRODUCT_MODULE := true
68
Marc Blankf4192872012-06-28 10:40:46 -070069LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags
Paul Westbrook2fb24a22014-08-01 10:53:36 -070070ifeq (eng,$(TARGET_BUILD_VARIANT))
71 LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
72endif
Makoto Onuki20f09c12010-03-02 14:03:08 -080073
Alon Albert4927a242013-11-05 17:54:30 -080074LOCAL_SDK_VERSION := current
Guang Zhu16fe2072010-06-14 17:36:44 -070075
The Android Open Source Project96c5af42009-03-03 19:32:22 -080076include $(BUILD_PACKAGE)
77
Ying Wang37f33852011-03-01 15:56:27 -080078# only include rules to build other stuff for the original package, not the derived package.
Marc Blankdc78a762011-02-14 14:39:27 -080079ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),)
The Android Open Source Project96c5af42009-03-03 19:32:22 -080080# additionally, build unit tests in a separate .apk
81include $(call all-makefiles-under,$(LOCAL_PATH))
Marc Blankdc78a762011-02-14 14:39:27 -080082endif