blob: c9c7b44444650e1ec105712e2c29e5a760d12108 [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 {
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000016 default_team: "trendy_team_fwk_core_networking",
Wei Wang6b7561d2021-06-03 17:33:14 -070017 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20filegroup {
21 name: "nearby-service-srcs",
22 srcs: [
23 "java/**/*.java",
Daniel (Ying Wai) Fan79d7ddc2022-01-07 16:51:18 -080024 ":statslog-nearby-java-gen",
Wei Wang6b7561d2021-06-03 17:33:14 -070025 ],
26}
27
28// Main lib for nearby services.
29java_library {
Chun Zhang10794312022-03-07 21:50:31 -080030 name: "service-nearby-pre-jarjar",
Wei Wang6b7561d2021-06-03 17:33:14 -070031 srcs: [":nearby-service-srcs"],
32
33 defaults: [
Cole Fausta52ecf02023-12-20 11:57:07 -080034 "framework-system-server-module-defaults",
Wei Wang6b7561d2021-06-03 17:33:14 -070035 ],
36 libs: [
Chun Zhangea54e5a2022-05-05 17:13:45 -070037 "androidx.annotation_annotation",
Jihoon Kang8401b6a2024-08-30 00:29:58 +000038 "framework-bluetooth.stubs.module_lib",
Chun Zhangbc34fdb2021-09-20 11:19:04 -070039 "error_prone_annotations",
Jihoon Kang8401b6a2024-08-30 00:29:58 +000040 "framework-configinfrastructure.stubs.module_lib",
paulhu4e21e802022-02-16 09:09:19 +080041 "framework-connectivity-t.impl",
Jihoon Kang8401b6a2024-08-30 00:29:58 +000042 "framework-statsd.stubs.module_lib",
Chun Zhangbc34fdb2021-09-20 11:19:04 -070043 ],
44 static_libs: [
Chun Zhang28660812021-09-22 20:48:39 -070045 "androidx.core_core",
Yahav Nussbaumcd6c6822024-02-13 20:56:31 +000046 "android.hardware.bluetooth.finder-V1-java",
Chun Zhangbbe60252021-09-21 22:05:03 -070047 "guava",
Chun Zhangfe6d0c12021-09-22 15:19:43 -070048 "libprotobuf-java-lite",
Chun Zhang00240662021-12-06 09:17:50 -080049 "modules-utils-build",
50 "modules-utils-handlerexecutor",
51 "modules-utils-preconditions",
52 "modules-utils-backgroundthread",
Chen Wang4b119ea2022-02-12 17:36:14 +000053 "presence-lite-protos",
Wei Wang6b7561d2021-06-03 17:33:14 -070054 ],
55 sdk_version: "system_server_current",
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090056 // This is included in service-connectivity which is 30+
Casey Borders13a35ea2023-07-13 00:30:38 +000057 // TODO (b/293613362): allow APEXes to have service jars with higher min_sdk than the APEX
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090058 // (service-connectivity is only used on 31+) and use 31 here
59 min_sdk_version: "30",
Wei Wang6b7561d2021-06-03 17:33:14 -070060
Wei Wang6b7561d2021-06-03 17:33:14 -070061 dex_preopt: {
62 enabled: false,
63 app_image: false,
64 },
65 visibility: [
66 "//packages/modules/Nearby/apex",
67 ],
68 apex_available: [
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090069 "com.android.tethering",
Wei Wang6b7561d2021-06-03 17:33:14 -070070 ],
Cole Fausta52ecf02023-12-20 11:57:07 -080071 lint: {
72 baseline_filename: "lint-baseline.xml",
73 },
Chun Zhang28417032021-09-20 14:10:38 -070074}
Daniel (Ying Wai) Fan79d7ddc2022-01-07 16:51:18 -080075
76genrule {
77 name: "statslog-nearby-java-gen",
78 tools: ["stats-log-api-gen"],
79 cmd: "$(location stats-log-api-gen) --java $(out) --module nearby " +
Cole Fausta52ecf02023-12-20 11:57:07 -080080 " --javaPackage com.android.server.nearby.proto --javaClass NearbyStatsLog" +
81 " --minApiLevel 33",
Daniel (Ying Wai) Fan79d7ddc2022-01-07 16:51:18 -080082 out: ["com/android/server/nearby/proto/NearbyStatsLog.java"],
83}