You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
3.3 KiB

  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. LOCAL_PATH := $(call my-dir)
  15. # Build the Email application itself, along with its tests and tests for the emailcommon
  16. # static library. All tests can be run via runtest email
  17. include $(CLEAR_VARS)
  18. # Include res dir from chips, unified, emailcommon, and photoviewer
  19. appcompat_dir := ../../../$(SUPPORT_LIBRARY_ROOT)/v7/appcompat/res
  20. chips_dir := ../../../frameworks/opt/chips/res
  21. unified_email_dir := ../UnifiedEmail
  22. photo_dir := ../../../frameworks/opt/photoviewer/res ../../../frameworks/opt/photoviewer/appcompat/res
  23. emailcommon_dir := emailcommon
  24. gridlayout_dir := ../../../$(SUPPORT_LIBRARY_ROOT)/v7/gridlayout/res
  25. bitmap_dir := ../../../frameworks/opt/bitmap/res
  26. datetimepicker_dir := ../../../frameworks/opt/datetimepicker/res
  27. res_dir := res $(unified_email_dir)/res $(chips_dir) $(photo_dir) $(emailcommon_dir)/res $(appcompat_dir) $(gridlayout_dir) $(bitmap_dir) $(datetimepicker_dir)
  28. LOCAL_MODULE_TAGS := optional
  29. LOCAL_SRC_FILES := $(call all-java-files-under, $(unified_email_dir)/src)
  30. LOCAL_SRC_FILES += $(call all-java-files-under, src/com/android)
  31. LOCAL_SRC_FILES += $(call all-java-files-under, provider_src/com/android)
  32. LOCAL_SRC_FILES += $(call all-java-files-under, src/com/beetstra)
  33. LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
  34. # Use assets dir from UnifiedEmail
  35. # (the default package target doesn't seem to deal with multiple asset dirs)
  36. LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets
  37. LOCAL_AAPT_FLAGS := --auto-add-overlay
  38. 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
  39. LOCAL_STATIC_JAVA_LIBRARIES := android-common com.android.emailcommon guava libchips
  40. LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer_appcompat
  41. LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
  42. LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
  43. LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-gridlayout
  44. LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
  45. LOCAL_STATIC_JAVA_LIBRARIES += android-opt-bitmap
  46. LOCAL_STATIC_JAVA_LIBRARIES += android-opt-datetimepicker
  47. LOCAL_STATIC_JAVA_LIBRARIES += owasp-html-sanitizer
  48. LOCAL_JAVA_LIBRARIES := org.apache.http.legacy
  49. LOCAL_PACKAGE_NAME := Email
  50. LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags
  51. ifeq (eng,$(TARGET_BUILD_VARIANT))
  52. LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
  53. endif
  54. #include $(BUILD_PACKAGE)
  55. # only include rules to build other stuff for the original package, not the derived package.
  56. ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),)
  57. # additionally, build unit tests in a separate .apk
  58. include $(call all-makefiles-under,$(LOCAL_PATH))
  59. endif