Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 1 | // 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 | |
| 15 | package { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 16 | default_team: "trendy_team_fwk_core_networking", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
| 20 | filegroup { |
| 21 | name: "nearby-service-srcs", |
| 22 | srcs: [ |
| 23 | "java/**/*.java", |
Daniel (Ying Wai) Fan | 79d7ddc | 2022-01-07 16:51:18 -0800 | [diff] [blame] | 24 | ":statslog-nearby-java-gen", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 25 | ], |
| 26 | } |
| 27 | |
| 28 | // Main lib for nearby services. |
| 29 | java_library { |
Chun Zhang | 1079431 | 2022-03-07 21:50:31 -0800 | [diff] [blame] | 30 | name: "service-nearby-pre-jarjar", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 31 | srcs: [":nearby-service-srcs"], |
| 32 | |
| 33 | defaults: [ |
Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 34 | "framework-system-server-module-defaults", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 35 | ], |
| 36 | libs: [ |
Chun Zhang | ea54e5a | 2022-05-05 17:13:45 -0700 | [diff] [blame] | 37 | "androidx.annotation_annotation", |
Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 38 | "framework-bluetooth.stubs.module_lib", |
Chun Zhang | bc34fdb | 2021-09-20 11:19:04 -0700 | [diff] [blame] | 39 | "error_prone_annotations", |
Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 40 | "framework-configinfrastructure.stubs.module_lib", |
paulhu | 4e21e80 | 2022-02-16 09:09:19 +0800 | [diff] [blame] | 41 | "framework-connectivity-t.impl", |
Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 42 | "framework-statsd.stubs.module_lib", |
Chun Zhang | bc34fdb | 2021-09-20 11:19:04 -0700 | [diff] [blame] | 43 | ], |
| 44 | static_libs: [ |
Chun Zhang | 2866081 | 2021-09-22 20:48:39 -0700 | [diff] [blame] | 45 | "androidx.core_core", |
Yahav Nussbaum | cd6c682 | 2024-02-13 20:56:31 +0000 | [diff] [blame] | 46 | "android.hardware.bluetooth.finder-V1-java", |
Chun Zhang | bbe6025 | 2021-09-21 22:05:03 -0700 | [diff] [blame] | 47 | "guava", |
Chun Zhang | fe6d0c1 | 2021-09-22 15:19:43 -0700 | [diff] [blame] | 48 | "libprotobuf-java-lite", |
Chun Zhang | 0024066 | 2021-12-06 09:17:50 -0800 | [diff] [blame] | 49 | "modules-utils-build", |
| 50 | "modules-utils-handlerexecutor", |
| 51 | "modules-utils-preconditions", |
| 52 | "modules-utils-backgroundthread", |
Chen Wang | 4b119ea | 2022-02-12 17:36:14 +0000 | [diff] [blame] | 53 | "presence-lite-protos", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 54 | ], |
| 55 | sdk_version: "system_server_current", |
Remi NGUYEN VAN | 15ed7d2 | 2022-01-07 13:20:08 +0900 | [diff] [blame] | 56 | // This is included in service-connectivity which is 30+ |
Casey Borders | 13a35ea | 2023-07-13 00:30:38 +0000 | [diff] [blame] | 57 | // TODO (b/293613362): allow APEXes to have service jars with higher min_sdk than the APEX |
Remi NGUYEN VAN | 15ed7d2 | 2022-01-07 13:20:08 +0900 | [diff] [blame] | 58 | // (service-connectivity is only used on 31+) and use 31 here |
| 59 | min_sdk_version: "30", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 60 | |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 61 | dex_preopt: { |
| 62 | enabled: false, |
| 63 | app_image: false, |
| 64 | }, |
| 65 | visibility: [ |
| 66 | "//packages/modules/Nearby/apex", |
| 67 | ], |
| 68 | apex_available: [ |
Remi NGUYEN VAN | 15ed7d2 | 2022-01-07 13:20:08 +0900 | [diff] [blame] | 69 | "com.android.tethering", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 70 | ], |
Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 71 | lint: { |
| 72 | baseline_filename: "lint-baseline.xml", |
| 73 | }, |
Chun Zhang | 2841703 | 2021-09-20 14:10:38 -0700 | [diff] [blame] | 74 | } |
Daniel (Ying Wai) Fan | 79d7ddc | 2022-01-07 16:51:18 -0800 | [diff] [blame] | 75 | |
| 76 | genrule { |
| 77 | name: "statslog-nearby-java-gen", |
| 78 | tools: ["stats-log-api-gen"], |
| 79 | cmd: "$(location stats-log-api-gen) --java $(out) --module nearby " + |
Cole Faust | a52ecf0 | 2023-12-20 11:57:07 -0800 | [diff] [blame] | 80 | " --javaPackage com.android.server.nearby.proto --javaClass NearbyStatsLog" + |
| 81 | " --minApiLevel 33", |
Daniel (Ying Wai) Fan | 79d7ddc | 2022-01-07 16:51:18 -0800 | [diff] [blame] | 82 | out: ["com/android/server/nearby/proto/NearbyStatsLog.java"], |
| 83 | } |