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# MDD Lite 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 = "lite", 28 srcs = glob( 29 ["*.java"], 30 exclude = [ 31 "DownloadListener.java", 32 "DownloadProgressMonitor.java", 33 "SingleFileDownloadProgressMonitor.java", 34 ], 35 ), 36 deps = [ 37 ":DownloadListener", 38 ":DownloadProgressMonitor", 39 "//java/com/google/android/libraries/mobiledatadownload:DownloadException", 40 "//java/com/google/android/libraries/mobiledatadownload/downloader:FileDownloader", 41 "//java/com/google/android/libraries/mobiledatadownload/foreground:ForegroundDownloadKey", 42 "//java/com/google/android/libraries/mobiledatadownload/foreground:NotificationUtil", 43 "//java/com/google/android/libraries/mobiledatadownload/internal/logging:LogUtil", 44 "//java/com/google/android/libraries/mobiledatadownload/internal/util:DownloadFutureMap", 45 "//java/com/google/android/libraries/mobiledatadownload/tracing", 46 "//java/com/google/android/libraries/mobiledatadownload/tracing:concurrent", 47 "@androidx_core_core", 48 "@com_google_auto_value", 49 "@com_google_errorprone_error_prone_annotations", 50 "@com_google_guava_guava", 51 "@org_checkerframework_qual", 52 ], 53) 54 55android_library( 56 name = "DownloadListener", 57 srcs = ["DownloadListener.java"], 58 deps = [ 59 "//proto:client_config_java_proto_lite", 60 "@com_google_guava_guava", 61 ], 62) 63 64android_library( 65 name = "DownloadProgressMonitor", 66 srcs = [ 67 "DownloadProgressMonitor.java", 68 "SingleFileDownloadProgressMonitor.java", 69 ], 70 deps = [ 71 ":DownloadListener", 72 "//java/com/google/android/libraries/mobiledatadownload:TimeSource", 73 "//java/com/google/android/libraries/mobiledatadownload/file/spi", 74 "//java/com/google/android/libraries/mobiledatadownload/internal:AndroidTimeSource", 75 "//java/com/google/android/libraries/mobiledatadownload/internal/logging:LogUtil", 76 "@androidx_annotation_annotation", 77 "@com_google_code_findbugs_jsr305", 78 "@com_google_errorprone_error_prone_annotations", 79 "@com_google_guava_guava", 80 ], 81) 82