blob: 81378f5ead50a8db748e59b070b9c4b10e7ca5de [file] [log] [blame]
paulhu802ab972021-12-14 01:30:22 +00001//
2// Copyright (C) 2021 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000018 default_team: "trendy_team_fwk_core_networking",
paulhu802ab972021-12-14 01:30:22 +000019 // See: http://go/android-license-faq
20 default_applicable_licenses: ["Android-Apache-2.0"],
21}
22
Remi NGUYEN VANc41daa42023-08-14 15:34:20 +090023service_remoteauth_pre_jarjar_lib = "service-remoteauth-pre-jarjar"
24
Remi NGUYEN VAN0395b702022-03-08 19:49:49 +090025// Include build rules from Sources.bp
26build = ["Sources.bp"]
27
Remi NGUYEN VAN86bbfe92022-03-30 18:51:41 +090028filegroup {
29 name: "service-connectivity-tiramisu-sources",
30 srcs: [
31 "src/**/*.java",
Yan Yanfd27f372024-11-19 00:35:25 +000032 ":vcn-location-sources",
Remi NGUYEN VAN86bbfe92022-03-30 18:51:41 +090033 ],
34 visibility: ["//visibility:private"],
35}
Cole Fausta52ecf02023-12-20 11:57:07 -080036
Remi NGUYEN VAN86bbfe92022-03-30 18:51:41 +090037// The above filegroup can be used to specify different sources depending
38// on the branch, while minimizing merge conflicts in the rest of the
39// build rules.
40
paulhu537f7202022-02-08 21:25:28 +080041// This builds T+ services depending on framework-connectivity-t
paulhu802ab972021-12-14 01:30:22 +000042// hidden symbols separately from the S+ services, to ensure that S+
43// services cannot accidentally depend on T+ hidden symbols from
paulhu537f7202022-02-08 21:25:28 +080044// framework-connectivity-t.
paulhu802ab972021-12-14 01:30:22 +000045java_library {
46 name: "service-connectivity-tiramisu-pre-jarjar",
47 sdk_version: "system_server_current",
48 // TODO(b/210962470): Bump this to at least S, and then T.
49 min_sdk_version: "30",
50 srcs: [
Remi NGUYEN VAN86bbfe92022-03-30 18:51:41 +090051 ":service-connectivity-tiramisu-sources",
paulhu802ab972021-12-14 01:30:22 +000052 ],
53 libs: [
54 "framework-annotations-lib",
Jihoon Kang8401b6a2024-08-30 00:29:58 +000055 "framework-configinfrastructure.stubs.module_lib",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090056 "framework-connectivity-pre-jarjar",
paulhu537f7202022-02-08 21:25:28 +080057 "framework-connectivity-t-pre-jarjar",
Igor Chernyshev9dac6602022-12-13 19:28:32 -080058 // TODO: use framework-tethering-pre-jarjar when it is separated from framework-tethering
59 "framework-tethering.impl",
Jihoon Kang8401b6a2024-08-30 00:29:58 +000060 "framework-wifi.stubs.module_lib",
paulhu802ab972021-12-14 01:30:22 +000061 "service-connectivity-pre-jarjar",
Remi NGUYEN VANb6cde3d2022-03-10 04:32:15 +000062 "service-nearby-pre-jarjar",
Sandro Montanari9ffc0682024-07-24 15:50:37 +000063 "service-networksecurity-pre-jarjar",
Kangping Donge7fef892023-08-11 15:30:09 +080064 "service-thread-pre-jarjar",
Remi NGUYEN VANc41daa42023-08-14 15:34:20 +090065 service_remoteauth_pre_jarjar_lib,
Xiao Ma0a171c02022-01-23 16:14:51 +000066 "ServiceConnectivityResources",
paulhu802ab972021-12-14 01:30:22 +000067 "unsupportedappusage",
68 ],
69 static_libs: [
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090070 // Do not add static_libs here if they are already included in framework-connectivity
71 // or in service-connectivity. They are not necessary (included via
72 // service-connectivity-pre-jarjar), and in the case of code that is already in
73 // framework-connectivity, the classes would be included in the apex twice.
paulhu802ab972021-12-14 01:30:22 +000074 "modules-utils-statemachine",
paulhu802ab972021-12-14 01:30:22 +000075 ],
76 apex_available: [
77 "com.android.tethering",
78 ],
79 visibility: [
Chiachang Wanga5d98752024-02-28 07:50:15 +000080 "//frameworks/base/services/tests/VpnTests",
Aaron Huang720ad7c2022-01-26 00:43:10 +080081 "//frameworks/base/tests/vcn",
paulhu802ab972021-12-14 01:30:22 +000082 "//packages/modules/Connectivity/service",
83 "//packages/modules/Connectivity/tests:__subpackages__",
Aaron Huang720ad7c2022-01-26 00:43:10 +080084 "//packages/modules/IPsec/tests/iketests",
paulhu802ab972021-12-14 01:30:22 +000085 ],
Cole Fausta52ecf02023-12-20 11:57:07 -080086 lint: {
87 baseline_filename: "lint-baseline.xml",
88 },
paulhu802ab972021-12-14 01:30:22 +000089}
Yuyang Huang6e12ac62023-04-04 13:00:54 +090090
91// Test building mDNS as a standalone, so that it can be imported into other repositories as-is.
92// The mDNS code is platform code so it should use framework-annotations-lib, contrary to apps that
93// should use sdk_version: "system_current" and only androidx.annotation_annotation. But this build
94// rule verifies that the mDNS code can be built into apps, if code transformations are applied to
95// the annotations.
96// When using "system_current", framework annotations are not available; they would appear as
97// package-private as they are marked as such in the system_current stubs. So build against
98// core_platform and add the stubs manually in "libs". See http://b/147773144#comment7.
99java_library {
100 name: "service-connectivity-mdns-standalone-build-test",
101 sdk_version: "core_platform",
Yuyang Huangfc831702023-08-21 17:48:48 +0900102 min_sdk_version: "21",
103 lint: {
104 error_checks: ["NewApi"],
MÃ¥rten Kongstad9179ef82024-06-17 17:18:54 +0200105 baseline_filename: "lint-baseline-service-connectivity-mdns-standalone-build-test.xml",
Yuyang Huangfc831702023-08-21 17:48:48 +0900106 },
Yuyang Huang6e12ac62023-04-04 13:00:54 +0900107 srcs: [
Yuyang Huang6e12ac62023-04-04 13:00:54 +0900108 "src/com/android/server/connectivity/mdns/**/*.java",
Cole Fausta52ecf02023-12-20 11:57:07 -0800109 ":service-mdns-droidstubs",
Yuyang Huang6e12ac62023-04-04 13:00:54 +0900110 ],
111 exclude_srcs: [
Paul Hub84bb3b2024-11-14 08:21:53 +0000112 "src/com/android/server/connectivity/mdns/internal/MdnsRealtimeScheduler.java",
Yuyang Huang6e12ac62023-04-04 13:00:54 +0900113 "src/com/android/server/connectivity/mdns/internal/SocketNetlinkMonitor.java",
Kangping Dong1a1beee2023-09-22 18:32:02 +0800114 "src/com/android/server/connectivity/mdns/MdnsAdvertiser.java",
115 "src/com/android/server/connectivity/mdns/MdnsAnnouncer.java",
116 "src/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java",
117 "src/com/android/server/connectivity/mdns/MdnsProber.java",
118 "src/com/android/server/connectivity/mdns/MdnsRecordRepository.java",
Paul Hub84bb3b2024-11-14 08:21:53 +0000119 "src/com/android/server/connectivity/mdns/SchedulerFactory.java",
120 "src/com/android/server/connectivity/mdns/SocketNetLinkMonitorFactory.java",
Yuyang Huang6e12ac62023-04-04 13:00:54 +0900121 ],
122 static_libs: [
123 "net-utils-device-common-mdns-standalone-build-test",
124 ],
125 libs: [
126 "framework-annotations-lib",
127 "android_system_stubs_current",
128 "androidx.annotation_annotation",
129 ],
130 visibility: [
131 "//visibility:private",
132 ],
133}
134
135droidstubs {
136 name: "service-mdns-droidstubs",
Paul Hub84bb3b2024-11-14 08:21:53 +0000137 srcs: [
138 "src/com/android/server/connectivity/mdns/SchedulerFactory.java",
139 "src/com/android/server/connectivity/mdns/SocketNetLinkMonitorFactory.java",
140 ],
Yuyang Huang6e12ac62023-04-04 13:00:54 +0900141 libs: [
142 "net-utils-device-common-mdns-standalone-build-test",
Cole Fausta52ecf02023-12-20 11:57:07 -0800143 "service-connectivity-tiramisu-pre-jarjar",
Yuyang Huang6e12ac62023-04-04 13:00:54 +0900144 ],
145 visibility: [
146 "//visibility:private",
147 ],
Kangping Donge7fef892023-08-11 15:30:09 +0800148}