• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 Google LLC
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.
14load("@build_bazel_rules_android//android:rules.bzl", "android_library")
15
16# MDI download (MDD) visibility is restricted to the following set of packages. Any
17# new clients must be added to this list in order to grant build visibility.
18package(
19    default_applicable_licenses = ["//:license"],
20    default_visibility = [
21        "//visibility:public",
22    ],
23    licenses = ["notice"],
24)
25
26android_library(
27    name = "mobiledatadownload",
28    srcs = [
29        "AddFileGroupRequest.java",
30        "CustomFileGroupValidator.java",
31        "DownloadFileGroupRequest.java",
32        "FileGroupPopulator.java",
33        "GetFileGroupRequest.java",
34        "GetFileGroupsByFilterRequest.java",
35        "ImportFilesRequest.java",
36        "MobileDataDownload.java",
37        "MobileDataDownloadImpl.java",
38        "ReadDataFileGroupRequest.java",
39        "RemoveFileGroupRequest.java",
40        "RemoveFileGroupsByFilterRequest.java",
41        "RemoveFileGroupsByFilterResponse.java",
42        "TaskScheduler.java",
43    ],
44    exports = [
45        ":single_file_interfaces",
46    ],
47    deps = [
48        ":DownloadException",
49        ":DownloadListener",
50        ":FileSource",
51        ":Flags",
52        ":TimeSource",
53        ":UsageEvent",
54        ":single_file_interfaces",
55        "//java/com/google/android/libraries/mobiledatadownload/account:AccountUtil",
56        "//java/com/google/android/libraries/mobiledatadownload/file",
57        "//java/com/google/android/libraries/mobiledatadownload/foreground:ForegroundDownloadKey",
58        "//java/com/google/android/libraries/mobiledatadownload/foreground:NotificationUtil",
59        "//java/com/google/android/libraries/mobiledatadownload/internal:DownloadGroupState",
60        "//java/com/google/android/libraries/mobiledatadownload/internal:ExceptionToMddResultMapper",
61        "//java/com/google/android/libraries/mobiledatadownload/internal:MddConstants",
62        "//java/com/google/android/libraries/mobiledatadownload/internal:MobileDataDownloadManager",
63        "//java/com/google/android/libraries/mobiledatadownload/internal/collect",
64        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:EventLogger",
65        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:LogUtil",
66        "//java/com/google/android/libraries/mobiledatadownload/internal/proto:metadata_java_proto_lite",
67        "//java/com/google/android/libraries/mobiledatadownload/internal/util:DownloadFutureMap",
68        "//java/com/google/android/libraries/mobiledatadownload/internal/util:MddLiteConversionUtil",
69        "//java/com/google/android/libraries/mobiledatadownload/internal/util:ProtoConversionUtil",
70        "//java/com/google/android/libraries/mobiledatadownload/lite",
71        "//java/com/google/android/libraries/mobiledatadownload/monitor:DownloadProgressMonitor",
72        "//java/com/google/android/libraries/mobiledatadownload/tracing",
73        "//java/com/google/android/libraries/mobiledatadownload/tracing:concurrent",
74        "//proto:client_config_java_proto_lite",
75        "//proto:download_config_java_proto_lite",
76        "//proto:log_enums_java_proto_lite",
77        "//proto:logs_java_proto_lite",
78        "@androidx_annotation_annotation",
79        "@androidx_core_core",
80        "@com_google_auto_value",
81        "@com_google_code_findbugs_jsr305",
82        "@com_google_guava_guava",
83        "@com_google_protobuf//:any_proto",
84        "@com_google_protobuf//:protobuf_lite",
85    ],
86)
87
88android_library(
89    name = "MobileDataDownloadBuilder",
90    srcs = [
91        "MobileDataDownloadBuilder.java",
92    ],
93    deps = [
94        ":AccountSource",
95        ":Configurator",
96        ":Constants",
97        ":ExperimentationConfig",
98        ":Flags",
99        ":Logger",
100        ":SilentFeedback",
101        ":mobiledatadownload",
102        "//java/com/google/android/libraries/mobiledatadownload/account:AccountManagerAccountSource",
103        "//java/com/google/android/libraries/mobiledatadownload/delta:DeltaDecoder",
104        "//java/com/google/android/libraries/mobiledatadownload/downloader:FileDownloader",
105        "//java/com/google/android/libraries/mobiledatadownload/file",
106        "//java/com/google/android/libraries/mobiledatadownload/foreground:NotificationUtil",
107        "//java/com/google/android/libraries/mobiledatadownload/internal/dagger:ApplicationContextModule",
108        "//java/com/google/android/libraries/mobiledatadownload/internal/dagger:DownloaderModule",
109        "//java/com/google/android/libraries/mobiledatadownload/internal/dagger:ExecutorsModule",
110        "//java/com/google/android/libraries/mobiledatadownload/internal/dagger:MainMddLibModule",
111        "//java/com/google/android/libraries/mobiledatadownload/internal/dagger:StandaloneComponent",
112        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:EventLogger",
113        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:LogSampler",
114        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:LogUtil",
115        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:MddEventLogger",
116        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:NoOpEventLogger",
117        "//java/com/google/android/libraries/mobiledatadownload/internal/proto:metadata_java_proto_lite",
118        "//java/com/google/android/libraries/mobiledatadownload/lite",
119        "//java/com/google/android/libraries/mobiledatadownload/monitor:DownloadProgressMonitor",
120        "//java/com/google/android/libraries/mobiledatadownload/monitor:NetworkUsageMonitor",
121        "//java/com/google/android/libraries/mobiledatadownload/tracing:concurrent",
122        "//proto:client_config_java_proto_lite",
123        "//proto:download_config_java_proto_lite",
124        "//proto:logs_java_proto_lite",
125        "@androidx_core_core",
126        "@com_google_auto_value",
127        "@com_google_dagger",
128        "@com_google_guava_guava",
129    ],
130)
131
132android_library(
133    name = "AccountSource",
134    srcs = ["AccountSource.java"],
135    deps = [
136        "@com_google_guava_guava",
137    ],
138)
139
140android_library(
141    name = "TimeSource",
142    srcs = ["TimeSource.java"],
143)
144
145android_library(
146    name = "Configurator",
147    srcs = ["Configurator.java"],
148    deps = [
149        "@com_google_guava_guava",
150    ],
151)
152
153android_library(
154    name = "Flags",
155    srcs = ["Flags.java"],
156)
157
158android_library(
159    name = "Logger",
160    srcs = ["Logger.java"],
161    deps = [
162        "@com_google_protobuf//:protobuf_lite",
163    ],
164)
165
166android_library(
167    name = "SilentFeedback",
168    srcs = ["SilentFeedback.java"],
169    deps = [
170        "@com_google_errorprone_error_prone_annotations",
171    ],
172)
173
174android_library(
175    name = "TaskScheduler",
176    srcs = ["TaskScheduler.java"],
177    deps = [
178        "@com_google_auto_value",
179        "@com_google_guava_guava",
180    ],
181)
182
183android_library(
184    name = "DownloadListener",
185    srcs = ["DownloadListener.java"],
186    deps = [
187        "//java/com/google/android/libraries/mobiledatadownload/internal/logging:LogUtil",
188        "//proto:client_config_java_proto_lite",
189    ],
190)
191
192android_library(
193    name = "Constants",
194    srcs = ["Constants.java"],
195    deps = [
196        "//proto:download_config_java_proto_lite",
197        "@com_google_guava_guava",
198    ],
199)
200
201android_library(
202    name = "DownloadException",
203    srcs = ["DownloadException.java"],
204    deps = [
205        "//java/com/google/android/libraries/mobiledatadownload/tracing:concurrent",
206        "@com_google_guava_guava",
207    ],
208)
209
210android_library(
211    name = "FileSource",
212    srcs = ["FileSource.java"],
213    deps = [
214        "@com_google_code_findbugs_jsr305",
215        "@com_google_protobuf//:protobuf_lite",
216    ],
217)
218
219android_library(
220    name = "AggregateException",
221    srcs = ["AggregateException.java"],
222    deps = [
223        "@androidx_annotation_annotation",
224        "@com_google_code_findbugs_jsr305",
225        "@com_google_guava_guava",
226    ],
227)
228
229android_library(
230    name = "single_file_interfaces",
231    srcs = [
232        "SingleFileDownloadListener.java",
233        "SingleFileDownloadRequest.java",
234    ],
235    deps = [
236        "//java/com/google/android/libraries/mobiledatadownload/downloader:FileDownloader",
237        "@com_google_auto_value",
238        "@com_google_guava_guava",
239    ],
240)
241
242android_library(
243    name = "UsageEvent",
244    srcs = [
245        "UsageEvent.java",
246    ],
247    deps = [
248        "//proto:client_config_java_proto_lite",
249        "//proto:log_enums_java_proto_lite",
250        "@com_google_auto_value",
251    ],
252)
253
254android_library(
255    name = "ExperimentationConfig",
256    srcs = ["ExperimentationConfig.java"],
257    deps = [
258        "@com_google_auto_value",
259        "@com_google_guava_guava",
260    ],
261)
262