Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 1 | # Local modifications: |
Eric Erfanian | 9a090c8 | 2017-03-16 19:22:24 -0700 | [diff] [blame] | 2 | # * removed com.google.android.geo.API_KEY key. This should be added to |
| 3 | # the manifest files in java/com/android/incallui/calllocation/impl/ |
| 4 | # and /java/com/android/incallui/maps/impl/ |
Eric Erfanian | 3bb9641 | 2017-06-22 10:19:53 -0700 | [diff] [blame] | 5 | # * b/62417801 modify translation string naming convention: |
| 6 | # $ find . -type d | grep 262 | rename 's/(values)\-([a-zA-Z\+\-]+)\-(mcc262-mnc01)/$1-$3-$2/' |
Eric Erfanian | 3bb9641 | 2017-06-22 10:19:53 -0700 | [diff] [blame] | 7 | # * b/37077388 temporarily disable proguard with javac |
Eric Erfanian | 939cdf0 | 2017-08-29 08:49:58 -0700 | [diff] [blame] | 8 | # * b/62875795 include manually generated GRPC service class: |
| 9 | # $ protoc --plugin=protoc-gen-grpc-java=prebuilts/tools/common/m2/repository/io/grpc/protoc-gen-grpc-java/1.0.3/protoc-gen-grpc-java-1.0.3-linux-x86_64.exe \ |
| 10 | # --grpc-java_out=lite:"packages/apps/Dialer/java/com/android/voicemail/impl/" \ |
| 11 | # --proto_path="packages/apps/Dialer/java/com/android/voicemail/impl/transcribe/grpc/" "packages/apps/Dialer/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto" |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 12 | LOCAL_PATH:= $(call my-dir) |
| 13 | include $(CLEAR_VARS) |
| 14 | |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 15 | # The base directory for Dialer sources. |
| 16 | BASE_DIR := java/com/android |
Jay Shrauner | 0f68a71 | 2014-07-16 16:13:57 -0700 | [diff] [blame] | 17 | |
Eric Erfanian | d5e47f6 | 2017-03-15 14:41:07 -0700 | [diff] [blame] | 18 | # Exclude files incompatible with AOSP. |
| 19 | EXCLUDE_FILES := \ |
Eric Erfanian | d5e47f6 | 2017-03-15 14:41:07 -0700 | [diff] [blame] | 20 | $(BASE_DIR)/incallui/calllocation/impl/AuthException.java \ |
| 21 | $(BASE_DIR)/incallui/calllocation/impl/CallLocationImpl.java \ |
| 22 | $(BASE_DIR)/incallui/calllocation/impl/CallLocationModule.java \ |
| 23 | $(BASE_DIR)/incallui/calllocation/impl/DownloadMapImageTask.java \ |
| 24 | $(BASE_DIR)/incallui/calllocation/impl/GoogleLocationSettingHelper.java \ |
| 25 | $(BASE_DIR)/incallui/calllocation/impl/HttpFetcher.java \ |
| 26 | $(BASE_DIR)/incallui/calllocation/impl/LocationFragment.java \ |
| 27 | $(BASE_DIR)/incallui/calllocation/impl/LocationHelper.java \ |
| 28 | $(BASE_DIR)/incallui/calllocation/impl/LocationPresenter.java \ |
| 29 | $(BASE_DIR)/incallui/calllocation/impl/LocationUrlBuilder.java \ |
| 30 | $(BASE_DIR)/incallui/calllocation/impl/ReverseGeocodeTask.java \ |
| 31 | $(BASE_DIR)/incallui/calllocation/impl/TrafficStatsTags.java \ |
| 32 | $(BASE_DIR)/incallui/maps/impl/MapsImpl.java \ |
| 33 | $(BASE_DIR)/incallui/maps/impl/MapsModule.java \ |
Eric Erfanian | 2f1c758 | 2017-06-19 11:26:01 -0700 | [diff] [blame] | 34 | $(BASE_DIR)/incallui/maps/impl/StaticMapFragment.java \ |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 35 | |
Paul Duffin | 922b108 | 2017-05-05 15:05:47 +0100 | [diff] [blame] | 36 | # Exclude testing only class, not used anywhere here |
| 37 | EXCLUDE_FILES += \ |
| 38 | $(BASE_DIR)/contacts/common/format/testing/SpannedTestUtils.java |
| 39 | |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 40 | # Exclude rootcomponentgenerator |
| 41 | EXCLUDE_FILES += \ |
Zachary Heidepriem | 7acd97f | 2018-04-06 12:28:36 -0700 | [diff] [blame] | 42 | $(call all-java-files-under, $(BASE_DIR)/dialer/rootcomponentgenerator) \ |
| 43 | $(call all-java-files-under, $(BASE_DIR)/dialer/inject/demo) |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 44 | |
Eric Erfanian | 3bb9641 | 2017-06-22 10:19:53 -0700 | [diff] [blame] | 45 | # Exclude build variants for now |
| 46 | EXCLUDE_FILES += \ |
Eric Erfanian | 3bb9641 | 2017-06-22 10:19:53 -0700 | [diff] [blame] | 47 | $(BASE_DIR)/dialer/constants/googledialer/ConstantsImpl.java \ |
| 48 | $(BASE_DIR)/dialer/binary/google/GoogleStubDialerRootComponent.java \ |
Eric Erfanian | 939cdf0 | 2017-08-29 08:49:58 -0700 | [diff] [blame] | 49 | $(BASE_DIR)/dialer/binary/google/GoogleStubDialerApplication.java \ |
| 50 | |
| 51 | # * b/62875795 |
| 52 | ifneq ($(wildcard packages/apps/Dialer/java/com/android/voicemail/impl/com/google/internal/communications/voicemailtranscription/v1/VoicemailTranscriptionServiceGrpc.java),) |
| 53 | $(error Please remove file packages/apps/Dialer/java/com/android/voicemail/impl/com/google/internal/communications/voicemailtranscription/v1/VoicemailTranscriptionServiceGrpc.java ) |
| 54 | endif |
Eric Erfanian | 3bb9641 | 2017-06-22 10:19:53 -0700 | [diff] [blame] | 55 | |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 56 | EXCLUDE_RESOURCE_DIRECTORIES := \ |
| 57 | java/com/android/incallui/maps/impl/res \ |
| 58 | |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 59 | # All Dialers resources. |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 60 | RES_DIRS := $(call all-subdir-named-dirs,res,.) |
| 61 | RES_DIRS := $(filter-out $(EXCLUDE_RESOURCE_DIRECTORIES),$(RES_DIRS)) |
Eric Erfanian | d5e47f6 | 2017-03-15 14:41:07 -0700 | [diff] [blame] | 62 | |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 63 | EXCLUDE_MANIFESTS := \ |
| 64 | $(BASE_DIR)/dialer/binary/aosp/testing/AndroidManifest.xml \ |
| 65 | $(BASE_DIR)/dialer/binary/google/AndroidManifest.xml \ |
| 66 | $(BASE_DIR)/incallui/calllocation/impl/AndroidManifest.xml \ |
| 67 | $(BASE_DIR)/incallui/maps/impl/AndroidManifest.xml \ |
Eric Erfanian | 9b4d9bc | 2017-07-25 09:36:19 -0700 | [diff] [blame] | 68 | |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 69 | # Dialer manifest files to merge. |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 70 | DIALER_MANIFEST_FILES := $(call all-named-files-under,AndroidManifest.xml,.) |
| 71 | DIALER_MANIFEST_FILES := $(filter-out $(EXCLUDE_MANIFESTS),$(DIALER_MANIFEST_FILES)) |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 72 | |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 73 | # Merge all manifest files. |
| 74 | LOCAL_FULL_LIBS_MANIFEST_FILES := \ |
| 75 | $(addprefix $(LOCAL_PATH)/, $(DIALER_MANIFEST_FILES)) |
Eric Erfanian | 1ce79b9 | 2017-08-10 08:11:26 -0700 | [diff] [blame] | 76 | |
sail | 3bcea98 | 2017-09-03 13:57:22 -0700 | [diff] [blame] | 77 | LOCAL_SRC_FILES := $(call all-java-files-under, $(BASE_DIR)) |
| 78 | LOCAL_SRC_FILES += $(call all-proto-files-under, $(BASE_DIR)) |
weijiaxu | 4bf1692 | 2018-06-22 12:52:21 -0700 | [diff] [blame] | 79 | LOCAL_SRC_FILES += $(call all-Iaidl-files-under, $(BASE_DIR)) |
Steven Moreland | ddd9049 | 2022-11-28 23:38:11 +0000 | [diff] [blame] | 80 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java/ |
Eric Erfanian | 939cdf0 | 2017-08-29 08:49:58 -0700 | [diff] [blame] | 81 | LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_SRC_FILES)) |
Eric Erfanian | 9bdb503 | 2017-08-09 15:37:50 -0700 | [diff] [blame] | 82 | |
Eric Erfanian | 8369df0 | 2017-05-03 10:27:13 -0700 | [diff] [blame] | 83 | LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH) |
| 84 | |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 85 | LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(RES_DIRS)) |
| 86 | |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 87 | EXCLUDE_EXTRA_PACKAGES := \ |
| 88 | com.android.dialer.binary.aosp.testing \ |
| 89 | com.android.dialer.binary.google \ |
| 90 | com.android.incallui.calllocation.impl \ |
| 91 | com.android.incallui.maps.impl \ |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 92 | |
| 93 | # We specify each package explicitly to glob resource files. |
Zachary Heidepriem | 95fafa8 | 2017-11-13 11:11:32 -0800 | [diff] [blame] | 94 | include ${LOCAL_PATH}/packages.mk |
Eric Erfanian | 5aaa949 | 2017-08-29 17:33:38 -0700 | [diff] [blame] | 95 | |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 96 | LOCAL_AAPT_FLAGS := $(filter-out $(EXCLUDE_EXTRA_PACKAGES),$(LOCAL_AAPT_FLAGS)) |
| 97 | LOCAL_AAPT_FLAGS := $(addprefix --extra-packages , $(LOCAL_AAPT_FLAGS)) |
| 98 | LOCAL_AAPT_FLAGS += \ |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 99 | --auto-add-overlay \ |
Eric Erfanian | 3bb9641 | 2017-06-22 10:19:53 -0700 | [diff] [blame] | 100 | --extra-packages me.leolin.shortcutbadger \ |
| 101 | |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 102 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 103 | android-common \ |
Eric Erfanian | 2f1c758 | 2017-06-19 11:26:01 -0700 | [diff] [blame] | 104 | android-support-dynamic-animation \ |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 105 | com.android.vcard \ |
Dan Willemsen | 144ff43 | 2022-09-14 07:44:59 -0700 | [diff] [blame] | 106 | dialer-common-m2-target-deps \ |
| 107 | dialer-glide-target-deps \ |
Colin Cross | 7a4f978 | 2021-11-22 14:09:09 -0800 | [diff] [blame] | 108 | error_prone_annotations \ |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 109 | jsr305 \ |
Eric Erfanian | 9bfcb3d | 2017-09-05 10:53:21 -0700 | [diff] [blame] | 110 | libbackup \ |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 111 | libphonenumber \ |
Eric Erfanian | cdb1edf | 2017-03-29 10:20:40 -0700 | [diff] [blame] | 112 | volley \ |
Dan Willemsen | 144ff43 | 2022-09-14 07:44:59 -0700 | [diff] [blame] | 113 | zxing-core-1.7 \ |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 114 | |
Alan Viverette | b5870be | 2017-04-26 11:15:10 -0400 | [diff] [blame] | 115 | LOCAL_STATIC_ANDROID_LIBRARIES := \ |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 116 | android-support-core-ui \ |
Alan Viverette | 423e293 | 2018-02-01 15:52:28 -0500 | [diff] [blame] | 117 | $(ANDROID_SUPPORT_DESIGN_TARGETS) \ |
Alan Viverette | b5870be | 2017-04-26 11:15:10 -0400 | [diff] [blame] | 118 | android-support-transition \ |
| 119 | android-support-v13 \ |
| 120 | android-support-v4 \ |
| 121 | android-support-v7-appcompat \ |
| 122 | android-support-v7-cardview \ |
| 123 | android-support-v7-recyclerview \ |
| 124 | |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 125 | LOCAL_JAVA_LIBRARIES := \ |
Colin Cross | f0268ec | 2020-06-19 14:00:55 -0700 | [diff] [blame] | 126 | auto_value_annotations \ |
Eric Erfanian | 3bb9641 | 2017-06-22 10:19:53 -0700 | [diff] [blame] | 127 | org.apache.http.legacy \ |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 128 | |
Roland Levillain | 05d6361 | 2017-08-24 14:41:12 +0100 | [diff] [blame] | 129 | LOCAL_ANNOTATION_PROCESSORS := \ |
Colin Cross | f0268ec | 2020-06-19 14:00:55 -0700 | [diff] [blame] | 130 | auto_value_plugin \ |
Krzysztof Kosiński | 3257de3 | 2022-09-14 06:25:38 +0000 | [diff] [blame] | 131 | javapoet \ |
Dan Willemsen | 144ff43 | 2022-09-14 07:44:59 -0700 | [diff] [blame] | 132 | dialer-common-m2-host-deps \ |
| 133 | dialer-dagger2-compiler-deps \ |
| 134 | dialer-glide-host-deps \ |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 135 | dialer-rootcomponentprocessor |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 136 | |
Roland Levillain | 05d6361 | 2017-08-24 14:41:12 +0100 | [diff] [blame] | 137 | LOCAL_ANNOTATION_PROCESSOR_CLASSES := \ |
Zachary Heidepriem | 7acd97f | 2018-04-06 12:28:36 -0700 | [diff] [blame] | 138 | com.google.auto.value.processor.AutoValueProcessor,dagger.internal.codegen.ComponentProcessor,com.bumptech.glide.annotation.compiler.GlideAnnotationProcessor,com.android.dialer.rootcomponentgenerator.RootComponentProcessor |
Eric Erfanian | 2f1c758 | 2017-06-19 11:26:01 -0700 | [diff] [blame] | 139 | |
Eric Erfanian | 9050823 | 2017-03-24 09:31:16 -0700 | [diff] [blame] | 140 | # Proguard includes |
Colin Cross | 23b83ca | 2017-12-13 20:57:34 -0800 | [diff] [blame] | 141 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(call all-named-files-under,proguard.*flags,$(BASE_DIR)) |
Colin Cross | f939e09 | 2017-04-05 22:13:40 -0700 | [diff] [blame] | 142 | LOCAL_PROGUARD_ENABLED := custom |
| 143 | |
Colin Cross | f939e09 | 2017-04-05 22:13:40 -0700 | [diff] [blame] | 144 | LOCAL_PROGUARD_ENABLED += optimization |
Eric Erfanian | 2f1c758 | 2017-06-19 11:26:01 -0700 | [diff] [blame] | 145 | |
Ta-wei Yen | 6640e55 | 2017-04-21 15:33:24 -0700 | [diff] [blame] | 146 | LOCAL_SDK_VERSION := system_current |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 147 | LOCAL_MODULE_TAGS := optional |
| 148 | LOCAL_PACKAGE_NAME := Dialer |
| 149 | LOCAL_CERTIFICATE := shared |
| 150 | LOCAL_PRIVILEGED_MODULE := true |
Anton Hansson | 4dccc47 | 2019-01-25 13:58:33 +0000 | [diff] [blame] | 151 | LOCAL_PRODUCT_MODULE := true |
Eric Erfanian | 8369df0 | 2017-05-03 10:27:13 -0700 | [diff] [blame] | 152 | LOCAL_USE_AAPT2 := true |
Anton Hansson | 4dccc47 | 2019-01-25 13:58:33 +0000 | [diff] [blame] | 153 | LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.dialer |
Ulya Trafimovich | c89f1e1 | 2021-03-11 13:52:38 +0000 | [diff] [blame] | 154 | LOCAL_USES_LIBRARIES := org.apache.http.legacy |
Eric Erfanian | 8369df0 | 2017-05-03 10:27:13 -0700 | [diff] [blame] | 155 | |
Bob Badour | 02d6436 | 2021-04-23 16:13:08 -0700 | [diff] [blame] | 156 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 |
| 157 | LOCAL_LICENSE_CONDITIONS := notice |
| 158 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE |
Chiao Cheng | 94b10b5 | 2012-08-17 16:59:12 -0700 | [diff] [blame] | 159 | include $(BUILD_PACKAGE) |
| 160 | |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 161 | # Cleanup local state |
| 162 | BASE_DIR := |
Eric Erfanian | d5e47f6 | 2017-03-15 14:41:07 -0700 | [diff] [blame] | 163 | EXCLUDE_FILES := |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 164 | RES_DIRS := |
| 165 | DIALER_MANIFEST_FILES := |
Eric Erfanian | 415dffb | 2017-08-08 14:32:39 -0700 | [diff] [blame] | 166 | EXCLUDE_MANIFESTS := |
| 167 | EXCLUDE_EXTRA_PACKAGES := |
Eric Erfanian | ccca315 | 2017-02-22 16:32:36 -0800 | [diff] [blame] | 168 | |
Colin Cross | 23b83ca | 2017-12-13 20:57:34 -0800 | [diff] [blame] | 169 | include $(CLEAR_VARS) |
| 170 | |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 171 | LOCAL_MODULE := dialer-rootcomponentprocessor |
Bob Badour | e7e7bbf | 2021-02-12 16:28:27 -0800 | [diff] [blame] | 172 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 |
| 173 | LOCAL_LICENSE_CONDITIONS := notice |
| 174 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 175 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
| 176 | LOCAL_IS_HOST_MODULE := true |
| 177 | BASE_DIR := java/com/android |
| 178 | |
| 179 | LOCAL_SRC_FILES := \ |
Zachary Heidepriem | 7acd97f | 2018-04-06 12:28:36 -0700 | [diff] [blame] | 180 | $(call all-java-files-under, $(BASE_DIR)/dialer/rootcomponentgenerator) \ |
| 181 | $(BASE_DIR)/dialer/inject/DialerRootComponent.java \ |
| 182 | $(BASE_DIR)/dialer/inject/DialerVariant.java \ |
| 183 | $(BASE_DIR)/dialer/inject/HasRootComponent.java \ |
| 184 | $(BASE_DIR)/dialer/inject/IncludeInDialerRoot.java \ |
| 185 | $(BASE_DIR)/dialer/inject/InstallIn.java \ |
| 186 | $(BASE_DIR)/dialer/inject/RootComponentGeneratorMetadata.java |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 187 | |
| 188 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Dan Willemsen | 144ff43 | 2022-09-14 07:44:59 -0700 | [diff] [blame] | 189 | dialer-common-m2-host-deps \ |
Krzysztof Kosiński | 3257de3 | 2022-09-14 06:25:38 +0000 | [diff] [blame] | 190 | javapoet \ |
Colin Cross | f0268ec | 2020-06-19 14:00:55 -0700 | [diff] [blame] | 191 | auto_service_annotations \ |
| 192 | auto_common \ |
Colin Cross | 7a4f978 | 2021-11-22 14:09:09 -0800 | [diff] [blame] | 193 | error_prone_annotations |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 194 | |
Weijia Xu | cac4acd | 2018-03-23 18:13:41 -0700 | [diff] [blame] | 195 | LOCAL_JAVA_LANGUAGE_VERSION := 1.8 |
| 196 | |
| 197 | include $(BUILD_HOST_JAVA_LIBRARY) |
| 198 | |
| 199 | include $(CLEAR_VARS) |