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 15 LOCAL_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 20 include $(CLEAR_VARS) 21 22 unified_email_dir := ../UnifiedEmail 23 res_dir := res $(unified_email_dir)/res 24 25 LOCAL_MODULE_TAGS := optional 26 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) 29 LOCAL_SRC_FILES += $(call all-java-files-under, provider_src/com/android) 30 LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra) 31 32 LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir)) 33 LOCAL_USE_AAPT2 := true 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 39 LOCAL_AAPT_FLAGS := --auto-add-overlay 40 LOCAL_AAPT_FLAGS += --extra-packages com.android.mail:com.android.email:com.android.emailcommon 41 42 LOCAL_STATIC_ANDROID_LIBRARIES := \ 43 com.android.emailcommon \ 44 libchips \ 45 libphotoviewer_appcompat \ 46 android-opt-bitmap \ 47 android-opt-datetimepicker \ 48 android-support-compat \ 49 android-support-media-compat \ 50 android-support-core-utils \ 51 android-support-core-ui \ 52 android-support-fragment \ 53 android-support-v7-appcompat \ 54 android-support-v7-gridlayout \ 55 android-support-v13 56 57 LOCAL_STATIC_JAVA_LIBRARIES := \ 58 android-support-annotations \ 59 android-common \ 60 guava \ 61 owasp-html-sanitizer 62 63 LOCAL_JAVA_LIBRARIES := org.apache.http.legacy 64 65 LOCAL_PACKAGE_NAME := Email 66 67 LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags 68 ifeq (eng,$(TARGET_BUILD_VARIANT)) 69 LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags 70 endif 71 72 LOCAL_SDK_VERSION := current 73 74 include $(BUILD_PACKAGE) 75 76 # only include rules to build other stuff for the original package, not the derived package. 77 ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),) 78 # additionally, build unit tests in a separate .apk 79 include $(call all-makefiles-under,$(LOCAL_PATH)) 80 endif 81