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 15LOCAL_PATH := $(call my-dir) 16 17# Build the Email application itself, along with its tests and tests for the emailcommon 18# static library. All tests can be run via runtest email 19 20include $(CLEAR_VARS) 21 22unified_email_dir := ../UnifiedEmail 23res_dir := res $(unified_email_dir)/res 24 25LOCAL_MODULE_TAGS := optional 26 27LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src) 28LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android) 29LOCAL_SRC_FILES += $(call all-java-files-under, provider_src/com/android) 30LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra) 31 32LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir)) 33LOCAL_USE_AAPT2 := true 34 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 39LOCAL_AAPT_FLAGS := --auto-add-overlay 40LOCAL_AAPT_FLAGS += --extra-packages com.android.mail:com.android.email:com.android.emailcommon 41 42LOCAL_STATIC_ANDROID_LIBRARIES := \ 43 com.android.emailcommon \ 44 libchips \ 45 libphotoviewer_appcompat \ 46 android-opt-bitmap \ 47 android-opt-datetimepicker \ 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 56 57LOCAL_STATIC_JAVA_LIBRARIES := \ 58 androidx.annotation_annotation \ 59 android-common \ 60 guava \ 61 owasp-html-sanitizer 62 63LOCAL_JAVA_LIBRARIES := org.apache.http.legacy 64 65LOCAL_PACKAGE_NAME := Email 66 67LOCAL_PRODUCT_MODULE := true 68 69LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags 70ifeq (eng,$(TARGET_BUILD_VARIANT)) 71 LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags 72endif 73 74LOCAL_SDK_VERSION := current 75 76include $(BUILD_PACKAGE) 77 78# only include rules to build other stuff for the original package, not the derived package. 79ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),) 80# additionally, build unit tests in a separate .apk 81include $(call all-makefiles-under,$(LOCAL_PATH)) 82endif 83