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 { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 17 | } |
| 18 | |
| 19 | filegroup { |
| 20 | name: "nearby-service-srcs", |
| 21 | srcs: [ |
| 22 | "java/**/*.java", |
| 23 | ], |
| 24 | } |
| 25 | |
Weice | 57d88f6 | 2021-12-06 06:24:56 +0000 | [diff] [blame] | 26 | filegroup { |
| 27 | name: "nearby-service-string-res", |
| 28 | srcs: [ |
| 29 | "java/**/Constant.java", |
Weice | fcd891b | 2021-12-28 23:31:08 +0000 | [diff] [blame] | 30 | "java/**/UserActionHandlerBase.java", |
| 31 | "java/**/UserActionHandler.java", |
| 32 | "java/**/FastPairConstants.java", |
Weice | 57d88f6 | 2021-12-06 06:24:56 +0000 | [diff] [blame] | 33 | ], |
| 34 | } |
| 35 | |
| 36 | java_library { |
| 37 | name: "nearby-service-string", |
| 38 | srcs: [":nearby-service-string-res"], |
Roopa Sattiraju | e8fabcc | 2022-01-11 20:40:07 -0800 | [diff] [blame] | 39 | libs: ["framework-bluetooth"], |
Weice | 57d88f6 | 2021-12-06 06:24:56 +0000 | [diff] [blame] | 40 | sdk_version: "module_current", |
| 41 | } |
| 42 | |
| 43 | |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 44 | // Main lib for nearby services. |
| 45 | java_library { |
| 46 | name: "service-nearby", |
| 47 | srcs: [":nearby-service-srcs"], |
| 48 | |
| 49 | defaults: [ |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 50 | "framework-system-server-module-defaults" |
| 51 | ], |
| 52 | libs: [ |
Roopa Sattiraju | e8fabcc | 2022-01-11 20:40:07 -0800 | [diff] [blame] | 53 | "framework-bluetooth.stubs.module_lib", // TODO(b/215722418): Change to framework-bluetooth once fixed |
Chun Zhang | bc34fdb | 2021-09-20 11:19:04 -0700 | [diff] [blame] | 54 | "error_prone_annotations", |
Remi NGUYEN VAN | 15ed7d2 | 2022-01-07 13:20:08 +0900 | [diff] [blame] | 55 | "framework-connectivity-tiramisu.impl", |
Chun Zhang | bc34fdb | 2021-09-20 11:19:04 -0700 | [diff] [blame] | 56 | ], |
| 57 | static_libs: [ |
Chun Zhang | bc34fdb | 2021-09-20 11:19:04 -0700 | [diff] [blame] | 58 | "androidx.annotation_annotation", |
Chun Zhang | 2866081 | 2021-09-22 20:48:39 -0700 | [diff] [blame] | 59 | "androidx.core_core", |
Weice | fcd891b | 2021-12-28 23:31:08 +0000 | [diff] [blame] | 60 | "androidx.localbroadcastmanager_localbroadcastmanager", |
Chun Zhang | bbe6025 | 2021-09-21 22:05:03 -0700 | [diff] [blame] | 61 | "guava", |
Chun Zhang | fe6d0c1 | 2021-09-22 15:19:43 -0700 | [diff] [blame] | 62 | "libprotobuf-java-lite", |
weicesun | b989a18 | 2021-11-04 14:14:54 -0700 | [diff] [blame] | 63 | "fast-pair-lite-protos", |
Chun Zhang | 0024066 | 2021-12-06 09:17:50 -0800 | [diff] [blame] | 64 | "modules-utils-build", |
| 65 | "modules-utils-handlerexecutor", |
| 66 | "modules-utils-preconditions", |
| 67 | "modules-utils-backgroundthread", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 68 | ], |
| 69 | sdk_version: "system_server_current", |
Remi NGUYEN VAN | 15ed7d2 | 2022-01-07 13:20:08 +0900 | [diff] [blame] | 70 | // 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 Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 74 | |
| 75 | installable: true, |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 76 | dex_preopt: { |
| 77 | enabled: false, |
| 78 | app_image: false, |
| 79 | }, |
| 80 | visibility: [ |
| 81 | "//packages/modules/Nearby/apex", |
| 82 | ], |
| 83 | apex_available: [ |
Remi NGUYEN VAN | 15ed7d2 | 2022-01-07 13:20:08 +0900 | [diff] [blame] | 84 | "com.android.tethering", |
Wei Wang | 6b7561d | 2021-06-03 17:33:14 -0700 | [diff] [blame] | 85 | ], |
Chun Zhang | 2841703 | 2021-09-20 14:10:38 -0700 | [diff] [blame] | 86 | } |