blob: 1e1af20e884e7758c351fd93b862c5cbfedbfdf0 [file] [log] [blame]
Wei Wang6b7561d2021-06-03 17:33:14 -07001// Copyright (C) 2021 The Android Open Source Project
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.
14
15package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19filegroup {
20 name: "nearby-service-srcs",
21 srcs: [
22 "java/**/*.java",
23 ],
24}
25
Weice57d88f62021-12-06 06:24:56 +000026filegroup {
27 name: "nearby-service-string-res",
28 srcs: [
29 "java/**/Constant.java",
Weicefcd891b2021-12-28 23:31:08 +000030 "java/**/UserActionHandlerBase.java",
31 "java/**/UserActionHandler.java",
32 "java/**/FastPairConstants.java",
Weice57d88f62021-12-06 06:24:56 +000033 ],
34}
35
36java_library {
37 name: "nearby-service-string",
38 srcs: [":nearby-service-string-res"],
Roopa Sattirajue8fabcc2022-01-11 20:40:07 -080039 libs: ["framework-bluetooth"],
Weice57d88f62021-12-06 06:24:56 +000040 sdk_version: "module_current",
41}
42
43
Wei Wang6b7561d2021-06-03 17:33:14 -070044// Main lib for nearby services.
45java_library {
46 name: "service-nearby",
47 srcs: [":nearby-service-srcs"],
48
49 defaults: [
Wei Wang6b7561d2021-06-03 17:33:14 -070050 "framework-system-server-module-defaults"
51 ],
52 libs: [
Roopa Sattirajue8fabcc2022-01-11 20:40:07 -080053 "framework-bluetooth.stubs.module_lib", // TODO(b/215722418): Change to framework-bluetooth once fixed
Chun Zhangbc34fdb2021-09-20 11:19:04 -070054 "error_prone_annotations",
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090055 "framework-connectivity-tiramisu.impl",
Chun Zhangbc34fdb2021-09-20 11:19:04 -070056 ],
57 static_libs: [
Chun Zhangbc34fdb2021-09-20 11:19:04 -070058 "androidx.annotation_annotation",
Chun Zhang28660812021-09-22 20:48:39 -070059 "androidx.core_core",
Weicefcd891b2021-12-28 23:31:08 +000060 "androidx.localbroadcastmanager_localbroadcastmanager",
Chun Zhangbbe60252021-09-21 22:05:03 -070061 "guava",
Chun Zhangfe6d0c12021-09-22 15:19:43 -070062 "libprotobuf-java-lite",
weicesunb989a182021-11-04 14:14:54 -070063 "fast-pair-lite-protos",
Chun Zhang00240662021-12-06 09:17:50 -080064 "modules-utils-build",
65 "modules-utils-handlerexecutor",
66 "modules-utils-preconditions",
67 "modules-utils-backgroundthread",
Wei Wang6b7561d2021-06-03 17:33:14 -070068 ],
69 sdk_version: "system_server_current",
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090070 // This is included in service-connectivity which is 30+
71 // TODO: allow APEXes to have service jars with higher min_sdk than the APEX
72 // (service-connectivity is only used on 31+) and use 31 here
73 min_sdk_version: "30",
Wei Wang6b7561d2021-06-03 17:33:14 -070074
75 installable: true,
Wei Wang6b7561d2021-06-03 17:33:14 -070076 dex_preopt: {
77 enabled: false,
78 app_image: false,
79 },
80 visibility: [
81 "//packages/modules/Nearby/apex",
82 ],
83 apex_available: [
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090084 "com.android.tethering",
Wei Wang6b7561d2021-06-03 17:33:14 -070085 ],
Chun Zhang28417032021-09-20 14:10:38 -070086}