blob: 4e1ebf40b55e12dae70aee55b0bea7fbaa37e222 [file] [log] [blame]
Eric Erfanianccca3152017-02-22 16:32:36 -08001# Local modifications:
Eric Erfanian9a090c82017-03-16 19:22:24 -07002# * 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 Erfanian3bb96412017-06-22 10:19:53 -07005# * 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 Erfanian3bb96412017-06-22 10:19:53 -07007# * b/37077388 temporarily disable proguard with javac
Eric Erfanian939cdf02017-08-29 08:49:58 -07008# * 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 Cheng94b10b52012-08-17 16:59:12 -070012LOCAL_PATH:= $(call my-dir)
13include $(CLEAR_VARS)
14
Eric Erfanianccca3152017-02-22 16:32:36 -080015# The base directory for Dialer sources.
16BASE_DIR := java/com/android
Jay Shrauner0f68a712014-07-16 16:13:57 -070017
Eric Erfaniand5e47f62017-03-15 14:41:07 -070018# Exclude files incompatible with AOSP.
19EXCLUDE_FILES := \
Eric Erfaniand5e47f62017-03-15 14:41:07 -070020 $(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 Erfanian2f1c7582017-06-19 11:26:01 -070034 $(BASE_DIR)/incallui/maps/impl/StaticMapFragment.java \
Chiao Cheng94b10b52012-08-17 16:59:12 -070035
Paul Duffin922b1082017-05-05 15:05:47 +010036# Exclude testing only class, not used anywhere here
37EXCLUDE_FILES += \
38 $(BASE_DIR)/contacts/common/format/testing/SpannedTestUtils.java
39
Weijia Xucac4acd2018-03-23 18:13:41 -070040# Exclude rootcomponentgenerator
41EXCLUDE_FILES += \
Zachary Heidepriem7acd97f2018-04-06 12:28:36 -070042 $(call all-java-files-under, $(BASE_DIR)/dialer/rootcomponentgenerator) \
43 $(call all-java-files-under, $(BASE_DIR)/dialer/inject/demo)
Weijia Xucac4acd2018-03-23 18:13:41 -070044
Eric Erfanian3bb96412017-06-22 10:19:53 -070045# Exclude build variants for now
46EXCLUDE_FILES += \
Eric Erfanian3bb96412017-06-22 10:19:53 -070047 $(BASE_DIR)/dialer/constants/googledialer/ConstantsImpl.java \
48 $(BASE_DIR)/dialer/binary/google/GoogleStubDialerRootComponent.java \
Eric Erfanian939cdf02017-08-29 08:49:58 -070049 $(BASE_DIR)/dialer/binary/google/GoogleStubDialerApplication.java \
50
51# * b/62875795
52ifneq ($(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 )
54endif
Eric Erfanian3bb96412017-06-22 10:19:53 -070055
Eric Erfanian415dffb2017-08-08 14:32:39 -070056EXCLUDE_RESOURCE_DIRECTORIES := \
57 java/com/android/incallui/maps/impl/res \
58
Eric Erfanianccca3152017-02-22 16:32:36 -080059# All Dialers resources.
Eric Erfanian415dffb2017-08-08 14:32:39 -070060RES_DIRS := $(call all-subdir-named-dirs,res,.)
61RES_DIRS := $(filter-out $(EXCLUDE_RESOURCE_DIRECTORIES),$(RES_DIRS))
Eric Erfaniand5e47f62017-03-15 14:41:07 -070062
Eric Erfanian415dffb2017-08-08 14:32:39 -070063EXCLUDE_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 Erfanian9b4d9bc2017-07-25 09:36:19 -070068
Eric Erfanianccca3152017-02-22 16:32:36 -080069# Dialer manifest files to merge.
Eric Erfanian415dffb2017-08-08 14:32:39 -070070DIALER_MANIFEST_FILES := $(call all-named-files-under,AndroidManifest.xml,.)
71DIALER_MANIFEST_FILES := $(filter-out $(EXCLUDE_MANIFESTS),$(DIALER_MANIFEST_FILES))
Chiao Cheng94b10b52012-08-17 16:59:12 -070072
Eric Erfanianccca3152017-02-22 16:32:36 -080073# Merge all manifest files.
74LOCAL_FULL_LIBS_MANIFEST_FILES := \
75 $(addprefix $(LOCAL_PATH)/, $(DIALER_MANIFEST_FILES))
Eric Erfanian1ce79b92017-08-10 08:11:26 -070076
sail3bcea982017-09-03 13:57:22 -070077LOCAL_SRC_FILES := $(call all-java-files-under, $(BASE_DIR))
78LOCAL_SRC_FILES += $(call all-proto-files-under, $(BASE_DIR))
weijiaxu4bf16922018-06-22 12:52:21 -070079LOCAL_SRC_FILES += $(call all-Iaidl-files-under, $(BASE_DIR))
Eric Erfanian939cdf02017-08-29 08:49:58 -070080LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_SRC_FILES))
Eric Erfanian9bdb5032017-08-09 15:37:50 -070081
Eric Erfanian8369df02017-05-03 10:27:13 -070082LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)
83
Eric Erfanian415dffb2017-08-08 14:32:39 -070084LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(RES_DIRS))
85
Eric Erfanian415dffb2017-08-08 14:32:39 -070086EXCLUDE_EXTRA_PACKAGES := \
87 com.android.dialer.binary.aosp.testing \
88 com.android.dialer.binary.google \
89 com.android.incallui.calllocation.impl \
90 com.android.incallui.maps.impl \
Eric Erfanianccca3152017-02-22 16:32:36 -080091
92# We specify each package explicitly to glob resource files.
Zachary Heidepriem95fafa82017-11-13 11:11:32 -080093include ${LOCAL_PATH}/packages.mk
Eric Erfanian5aaa9492017-08-29 17:33:38 -070094
Eric Erfanian415dffb2017-08-08 14:32:39 -070095LOCAL_AAPT_FLAGS := $(filter-out $(EXCLUDE_EXTRA_PACKAGES),$(LOCAL_AAPT_FLAGS))
96LOCAL_AAPT_FLAGS := $(addprefix --extra-packages , $(LOCAL_AAPT_FLAGS))
97LOCAL_AAPT_FLAGS += \
Eric Erfanianccca3152017-02-22 16:32:36 -080098 --auto-add-overlay \
Eric Erfanian3bb96412017-06-22 10:19:53 -070099 --extra-packages me.leolin.shortcutbadger \
100
Chiao Cheng94b10b52012-08-17 16:59:12 -0700101LOCAL_STATIC_JAVA_LIBRARIES := \
Eric Erfanianccca3152017-02-22 16:32:36 -0800102 android-common \
Eric Erfanian2f1c7582017-06-19 11:26:01 -0700103 android-support-dynamic-animation \
Eric Erfanianccca3152017-02-22 16:32:36 -0800104 com.android.vcard \
Dan Willemsen964df892022-09-14 07:44:59 -0700105 dialer-common-m2-target-deps \
106 dialer-glide-target-deps \
Colin Cross7a4f9782021-11-22 14:09:09 -0800107 error_prone_annotations \
Eric Erfanianccca3152017-02-22 16:32:36 -0800108 jsr305 \
Eric Erfanian9bfcb3d2017-09-05 10:53:21 -0700109 libbackup \
Eric Erfanianccca3152017-02-22 16:32:36 -0800110 libphonenumber \
Eric Erfaniancdb1edf2017-03-29 10:20:40 -0700111 volley \
Dan Willemsen964df892022-09-14 07:44:59 -0700112 zxing-core-1.7 \
Chiao Cheng94b10b52012-08-17 16:59:12 -0700113
Alan Viveretteb5870be2017-04-26 11:15:10 -0400114LOCAL_STATIC_ANDROID_LIBRARIES := \
Eric Erfanian415dffb2017-08-08 14:32:39 -0700115 android-support-core-ui \
Alan Viverette423e2932018-02-01 15:52:28 -0500116 $(ANDROID_SUPPORT_DESIGN_TARGETS) \
Alan Viveretteb5870be2017-04-26 11:15:10 -0400117 android-support-transition \
118 android-support-v13 \
119 android-support-v4 \
120 android-support-v7-appcompat \
121 android-support-v7-cardview \
122 android-support-v7-recyclerview \
123
Eric Erfanianccca3152017-02-22 16:32:36 -0800124LOCAL_JAVA_LIBRARIES := \
Colin Crossf0268ec2020-06-19 14:00:55 -0700125 auto_value_annotations \
Eric Erfanian3bb96412017-06-22 10:19:53 -0700126 org.apache.http.legacy \
Eric Erfanianccca3152017-02-22 16:32:36 -0800127
Roland Levillain05d63612017-08-24 14:41:12 +0100128LOCAL_ANNOTATION_PROCESSORS := \
Colin Crossf0268ec2020-06-19 14:00:55 -0700129 auto_value_plugin \
Krzysztof Kosiński3257de32022-09-14 06:25:38 +0000130 javapoet \
Dan Willemsen964df892022-09-14 07:44:59 -0700131 dialer-common-m2-host-deps \
132 dialer-dagger2-compiler-deps \
133 dialer-glide-host-deps \
Weijia Xucac4acd2018-03-23 18:13:41 -0700134 dialer-rootcomponentprocessor
Eric Erfanianccca3152017-02-22 16:32:36 -0800135
Roland Levillain05d63612017-08-24 14:41:12 +0100136LOCAL_ANNOTATION_PROCESSOR_CLASSES := \
Zachary Heidepriem7acd97f2018-04-06 12:28:36 -0700137 com.google.auto.value.processor.AutoValueProcessor,dagger.internal.codegen.ComponentProcessor,com.bumptech.glide.annotation.compiler.GlideAnnotationProcessor,com.android.dialer.rootcomponentgenerator.RootComponentProcessor
Eric Erfanian2f1c7582017-06-19 11:26:01 -0700138
Eric Erfanian90508232017-03-24 09:31:16 -0700139# Proguard includes
Colin Cross23b83ca2017-12-13 20:57:34 -0800140LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(call all-named-files-under,proguard.*flags,$(BASE_DIR))
Colin Crossf939e092017-04-05 22:13:40 -0700141LOCAL_PROGUARD_ENABLED := custom
142
Colin Crossf939e092017-04-05 22:13:40 -0700143LOCAL_PROGUARD_ENABLED += optimization
Eric Erfanian2f1c7582017-06-19 11:26:01 -0700144
Ta-wei Yen6640e552017-04-21 15:33:24 -0700145LOCAL_SDK_VERSION := system_current
Eric Erfanianccca3152017-02-22 16:32:36 -0800146LOCAL_MODULE_TAGS := optional
147LOCAL_PACKAGE_NAME := Dialer
148LOCAL_CERTIFICATE := shared
149LOCAL_PRIVILEGED_MODULE := true
Anton Hansson4dccc472019-01-25 13:58:33 +0000150LOCAL_PRODUCT_MODULE := true
Eric Erfanian8369df02017-05-03 10:27:13 -0700151LOCAL_USE_AAPT2 := true
Anton Hansson4dccc472019-01-25 13:58:33 +0000152LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.dialer
Ulya Trafimovichc89f1e12021-03-11 13:52:38 +0000153LOCAL_USES_LIBRARIES := org.apache.http.legacy
Eric Erfanian8369df02017-05-03 10:27:13 -0700154
Bob Badour02d64362021-04-23 16:13:08 -0700155LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
156LOCAL_LICENSE_CONDITIONS := notice
157LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
Chiao Cheng94b10b52012-08-17 16:59:12 -0700158include $(BUILD_PACKAGE)
159
Eric Erfanianccca3152017-02-22 16:32:36 -0800160# Cleanup local state
161BASE_DIR :=
Eric Erfaniand5e47f62017-03-15 14:41:07 -0700162EXCLUDE_FILES :=
Eric Erfanianccca3152017-02-22 16:32:36 -0800163RES_DIRS :=
164DIALER_MANIFEST_FILES :=
Eric Erfanian415dffb2017-08-08 14:32:39 -0700165EXCLUDE_MANIFESTS :=
166EXCLUDE_EXTRA_PACKAGES :=
Eric Erfanianccca3152017-02-22 16:32:36 -0800167
Colin Cross23b83ca2017-12-13 20:57:34 -0800168include $(CLEAR_VARS)
169
Weijia Xucac4acd2018-03-23 18:13:41 -0700170LOCAL_MODULE := dialer-rootcomponentprocessor
Bob Badoure7e7bbf2021-02-12 16:28:27 -0800171LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
172LOCAL_LICENSE_CONDITIONS := notice
173LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
Weijia Xucac4acd2018-03-23 18:13:41 -0700174LOCAL_MODULE_CLASS := JAVA_LIBRARIES
175LOCAL_IS_HOST_MODULE := true
176BASE_DIR := java/com/android
177
178LOCAL_SRC_FILES := \
Zachary Heidepriem7acd97f2018-04-06 12:28:36 -0700179 $(call all-java-files-under, $(BASE_DIR)/dialer/rootcomponentgenerator) \
180 $(BASE_DIR)/dialer/inject/DialerRootComponent.java \
181 $(BASE_DIR)/dialer/inject/DialerVariant.java \
182 $(BASE_DIR)/dialer/inject/HasRootComponent.java \
183 $(BASE_DIR)/dialer/inject/IncludeInDialerRoot.java \
184 $(BASE_DIR)/dialer/inject/InstallIn.java \
185 $(BASE_DIR)/dialer/inject/RootComponentGeneratorMetadata.java
Weijia Xucac4acd2018-03-23 18:13:41 -0700186
187LOCAL_STATIC_JAVA_LIBRARIES := \
Dan Willemsen964df892022-09-14 07:44:59 -0700188 dialer-common-m2-host-deps \
Krzysztof Kosiński3257de32022-09-14 06:25:38 +0000189 javapoet \
Colin Crossf0268ec2020-06-19 14:00:55 -0700190 auto_service_annotations \
191 auto_common \
Colin Cross7a4f9782021-11-22 14:09:09 -0800192 error_prone_annotations
Weijia Xucac4acd2018-03-23 18:13:41 -0700193
Weijia Xucac4acd2018-03-23 18:13:41 -0700194LOCAL_JAVA_LANGUAGE_VERSION := 1.8
195
196include $(BUILD_HOST_JAVA_LIBRARY)
197
198include $(CLEAR_VARS)