blob: 17b80b0d845e9490546694c7db449e8023e432e6 [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",
Daniel (Ying Wai) Fan79d7ddc2022-01-07 16:51:18 -080023 ":statslog-nearby-java-gen",
Wei Wang6b7561d2021-06-03 17:33:14 -070024 ],
25}
26
27// Main lib for nearby services.
28java_library {
Chun Zhang10794312022-03-07 21:50:31 -080029 name: "service-nearby-pre-jarjar",
Wei Wang6b7561d2021-06-03 17:33:14 -070030 srcs: [":nearby-service-srcs"],
31
32 defaults: [
Cole Fausta52ecf02023-12-20 11:57:07 -080033 "framework-system-server-module-defaults",
Wei Wang6b7561d2021-06-03 17:33:14 -070034 ],
35 libs: [
Chun Zhangea54e5a2022-05-05 17:13:45 -070036 "androidx.annotation_annotation",
Paul Duffin5118a522022-10-05 18:34:24 +010037 "framework-bluetooth",
Chun Zhangbc34fdb2021-09-20 11:19:04 -070038 "error_prone_annotations",
Hassan Alic4f63fa2022-11-17 16:13:48 +000039 "framework-configinfrastructure",
paulhu4e21e802022-02-16 09:09:19 +080040 "framework-connectivity-t.impl",
Paul Duffin5118a522022-10-05 18:34:24 +010041 "framework-statsd",
Chun Zhangbc34fdb2021-09-20 11:19:04 -070042 ],
43 static_libs: [
Chun Zhang28660812021-09-22 20:48:39 -070044 "androidx.core_core",
Chun Zhangbbe60252021-09-21 22:05:03 -070045 "guava",
Chun Zhangfe6d0c12021-09-22 15:19:43 -070046 "libprotobuf-java-lite",
Chun Zhang00240662021-12-06 09:17:50 -080047 "modules-utils-build",
48 "modules-utils-handlerexecutor",
49 "modules-utils-preconditions",
50 "modules-utils-backgroundthread",
Chen Wang4b119ea2022-02-12 17:36:14 +000051 "presence-lite-protos",
Wei Wang6b7561d2021-06-03 17:33:14 -070052 ],
53 sdk_version: "system_server_current",
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090054 // This is included in service-connectivity which is 30+
Casey Borders13a35ea2023-07-13 00:30:38 +000055 // TODO (b/293613362): allow APEXes to have service jars with higher min_sdk than the APEX
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090056 // (service-connectivity is only used on 31+) and use 31 here
57 min_sdk_version: "30",
Wei Wang6b7561d2021-06-03 17:33:14 -070058
Wei Wang6b7561d2021-06-03 17:33:14 -070059 dex_preopt: {
60 enabled: false,
61 app_image: false,
62 },
63 visibility: [
64 "//packages/modules/Nearby/apex",
65 ],
66 apex_available: [
Remi NGUYEN VAN15ed7d22022-01-07 13:20:08 +090067 "com.android.tethering",
Wei Wang6b7561d2021-06-03 17:33:14 -070068 ],
Cole Fausta52ecf02023-12-20 11:57:07 -080069 lint: {
70 baseline_filename: "lint-baseline.xml",
71 },
Chun Zhang28417032021-09-20 14:10:38 -070072}
Daniel (Ying Wai) Fan79d7ddc2022-01-07 16:51:18 -080073
74genrule {
75 name: "statslog-nearby-java-gen",
76 tools: ["stats-log-api-gen"],
77 cmd: "$(location stats-log-api-gen) --java $(out) --module nearby " +
Cole Fausta52ecf02023-12-20 11:57:07 -080078 " --javaPackage com.android.server.nearby.proto --javaClass NearbyStatsLog" +
79 " --minApiLevel 33",
Daniel (Ying Wai) Fan79d7ddc2022-01-07 16:51:18 -080080 out: ["com/android/server/nearby/proto/NearbyStatsLog.java"],
81}