blob: 99e2272b18b99566d7490ffc60a7e43120eb868a [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))
Steven Morelandddd90492022-11-28 23:38:11 +000080LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java/
Eric Erfanian939cdf02017-08-29 08:49:58 -070081LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_SRC_FILES))
Eric Erfanian9bdb5032017-08-09 15:37:50 -070082
Eric Erfanian8369df02017-05-03 10:27:13 -070083LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)
84
Eric Erfanian415dffb2017-08-08 14:32:39 -070085LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(RES_DIRS))
86
Eric Erfanian415dffb2017-08-08 14:32:39 -070087EXCLUDE_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 Erfanianccca3152017-02-22 16:32:36 -080092
93# We specify each package explicitly to glob resource files.
Zachary Heidepriem95fafa82017-11-13 11:11:32 -080094include ${LOCAL_PATH}/packages.mk
Eric Erfanian5aaa9492017-08-29 17:33:38 -070095
Eric Erfanian415dffb2017-08-08 14:32:39 -070096LOCAL_AAPT_FLAGS := $(filter-out $(EXCLUDE_EXTRA_PACKAGES),$(LOCAL_AAPT_FLAGS))
97LOCAL_AAPT_FLAGS := $(addprefix --extra-packages , $(LOCAL_AAPT_FLAGS))
98LOCAL_AAPT_FLAGS += \
Eric Erfanianccca3152017-02-22 16:32:36 -080099 --auto-add-overlay \
Eric Erfanian3bb96412017-06-22 10:19:53 -0700100 --extra-packages me.leolin.shortcutbadger \
101
Chiao Cheng94b10b52012-08-17 16:59:12 -0700102LOCAL_STATIC_JAVA_LIBRARIES := \
Eric Erfanianccca3152017-02-22 16:32:36 -0800103 android-common \
Eric Erfanian2f1c7582017-06-19 11:26:01 -0700104 android-support-dynamic-animation \
Eric Erfanianccca3152017-02-22 16:32:36 -0800105 com.android.vcard \
Dan Willemsen144ff432022-09-14 07:44:59 -0700106 dialer-common-m2-target-deps \
107 dialer-glide-target-deps \
Colin Cross7a4f9782021-11-22 14:09:09 -0800108 error_prone_annotations \
Eric Erfanianccca3152017-02-22 16:32:36 -0800109 jsr305 \
Eric Erfanian9bfcb3d2017-09-05 10:53:21 -0700110 libbackup \
Eric Erfanianccca3152017-02-22 16:32:36 -0800111 libphonenumber \
Eric Erfaniancdb1edf2017-03-29 10:20:40 -0700112 volley \
Dan Willemsen144ff432022-09-14 07:44:59 -0700113 zxing-core-1.7 \
Chiao Cheng94b10b52012-08-17 16:59:12 -0700114
Alan Viveretteb5870be2017-04-26 11:15:10 -0400115LOCAL_STATIC_ANDROID_LIBRARIES := \
Eric Erfanian415dffb2017-08-08 14:32:39 -0700116 android-support-core-ui \
Alan Viverette423e2932018-02-01 15:52:28 -0500117 $(ANDROID_SUPPORT_DESIGN_TARGETS) \
Alan Viveretteb5870be2017-04-26 11:15:10 -0400118 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 Erfanianccca3152017-02-22 16:32:36 -0800125LOCAL_JAVA_LIBRARIES := \
Colin Crossf0268ec2020-06-19 14:00:55 -0700126 auto_value_annotations \
Eric Erfanian3bb96412017-06-22 10:19:53 -0700127 org.apache.http.legacy \
Eric Erfanianccca3152017-02-22 16:32:36 -0800128
Roland Levillain05d63612017-08-24 14:41:12 +0100129LOCAL_ANNOTATION_PROCESSORS := \
Colin Crossf0268ec2020-06-19 14:00:55 -0700130 auto_value_plugin \
Krzysztof Kosiński3257de32022-09-14 06:25:38 +0000131 javapoet \
Dan Willemsen144ff432022-09-14 07:44:59 -0700132 dialer-common-m2-host-deps \
133 dialer-dagger2-compiler-deps \
134 dialer-glide-host-deps \
Weijia Xucac4acd2018-03-23 18:13:41 -0700135 dialer-rootcomponentprocessor
Eric Erfanianccca3152017-02-22 16:32:36 -0800136
Roland Levillain05d63612017-08-24 14:41:12 +0100137LOCAL_ANNOTATION_PROCESSOR_CLASSES := \
Zachary Heidepriem7acd97f2018-04-06 12:28:36 -0700138 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 -0700139
Eric Erfanian90508232017-03-24 09:31:16 -0700140# Proguard includes
Colin Cross23b83ca2017-12-13 20:57:34 -0800141LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(call all-named-files-under,proguard.*flags,$(BASE_DIR))
Colin Crossf939e092017-04-05 22:13:40 -0700142LOCAL_PROGUARD_ENABLED := custom
143
Colin Crossf939e092017-04-05 22:13:40 -0700144LOCAL_PROGUARD_ENABLED += optimization
Eric Erfanian2f1c7582017-06-19 11:26:01 -0700145
Ta-wei Yen6640e552017-04-21 15:33:24 -0700146LOCAL_SDK_VERSION := system_current
Eric Erfanianccca3152017-02-22 16:32:36 -0800147LOCAL_MODULE_TAGS := optional
148LOCAL_PACKAGE_NAME := Dialer
149LOCAL_CERTIFICATE := shared
150LOCAL_PRIVILEGED_MODULE := true
Anton Hansson4dccc472019-01-25 13:58:33 +0000151LOCAL_PRODUCT_MODULE := true
Eric Erfanian8369df02017-05-03 10:27:13 -0700152LOCAL_USE_AAPT2 := true
Anton Hansson4dccc472019-01-25 13:58:33 +0000153LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.dialer
Ulya Trafimovichc89f1e12021-03-11 13:52:38 +0000154LOCAL_USES_LIBRARIES := org.apache.http.legacy
Eric Erfanian8369df02017-05-03 10:27:13 -0700155
Bob Badour02d64362021-04-23 16:13:08 -0700156LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
157LOCAL_LICENSE_CONDITIONS := notice
158LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
Chiao Cheng94b10b52012-08-17 16:59:12 -0700159include $(BUILD_PACKAGE)
160
Eric Erfanianccca3152017-02-22 16:32:36 -0800161# Cleanup local state
162BASE_DIR :=
Eric Erfaniand5e47f62017-03-15 14:41:07 -0700163EXCLUDE_FILES :=
Eric Erfanianccca3152017-02-22 16:32:36 -0800164RES_DIRS :=
165DIALER_MANIFEST_FILES :=
Eric Erfanian415dffb2017-08-08 14:32:39 -0700166EXCLUDE_MANIFESTS :=
167EXCLUDE_EXTRA_PACKAGES :=
Eric Erfanianccca3152017-02-22 16:32:36 -0800168
Colin Cross23b83ca2017-12-13 20:57:34 -0800169include $(CLEAR_VARS)
170
Weijia Xucac4acd2018-03-23 18:13:41 -0700171LOCAL_MODULE := dialer-rootcomponentprocessor
Bob Badoure7e7bbf2021-02-12 16:28:27 -0800172LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
173LOCAL_LICENSE_CONDITIONS := notice
174LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
Weijia Xucac4acd2018-03-23 18:13:41 -0700175LOCAL_MODULE_CLASS := JAVA_LIBRARIES
176LOCAL_IS_HOST_MODULE := true
177BASE_DIR := java/com/android
178
179LOCAL_SRC_FILES := \
Zachary Heidepriem7acd97f2018-04-06 12:28:36 -0700180 $(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 Xucac4acd2018-03-23 18:13:41 -0700187
188LOCAL_STATIC_JAVA_LIBRARIES := \
Dan Willemsen144ff432022-09-14 07:44:59 -0700189 dialer-common-m2-host-deps \
Krzysztof Kosiński3257de32022-09-14 06:25:38 +0000190 javapoet \
Colin Crossf0268ec2020-06-19 14:00:55 -0700191 auto_service_annotations \
192 auto_common \
Colin Cross7a4f9782021-11-22 14:09:09 -0800193 error_prone_annotations
Weijia Xucac4acd2018-03-23 18:13:41 -0700194
Weijia Xucac4acd2018-03-23 18:13:41 -0700195LOCAL_JAVA_LANGUAGE_VERSION := 1.8
196
197include $(BUILD_HOST_JAVA_LIBRARY)
198
199include $(CLEAR_VARS)