blob: 25a92910a45e21a60f32f2fe970d6097651c99b5 [file] [log] [blame]
Aaron Huangf73ff8c2019-12-06 18:12:24 +08001// Copyright (C) 2019 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
Aaron Huang57a94962020-01-03 20:35:55 +080015// 1. The "net-utils-framework-common" library is also compiled into the framework and placed on the
16// boot classpath. It uses jarjar rules so that anything outside the framework can use this
17// library directly.
18// 2. The "net-utils-services-common" library is for use by modules and frameworks/base/services.
19// It does not need to be jarjared because it is not placed on the bootclasspath.
Lorenzo Colittie14bd342020-01-14 14:47:16 +090020// 3. The "net-utils-telephony-common-srcs" filegroup is for use specifically by telephony, which
21// places many of its classes, even non-API service classes, on the boot classpath. Any file that
22// is added to this filegroup *must* have a corresponding jarjar rule in the telephony jarjar
23// rules file. Otherwise, it will end up on the boot classpath and other modules will not be able
24// to provide their own copy.
Aaron Huangf73ff8c2019-12-06 18:12:24 +080025
Adrian Roos0607dd92020-03-27 00:30:41 +010026// Note: all filegroups here must have the right path attribute because otherwise, if they are
27// included in the bootclasspath, they could incorrectly be included in the SDK documentation even
28// though they are not in the current.txt files.
29
Bob Badour1b8c7442021-02-12 15:39:10 -080030package {
31 default_applicable_licenses: ["Android-Apache-2.0"],
32}
33
Chalard Jean48c6c7d2020-06-25 23:39:15 +090034java_library {
35 name: "net-utils-device-common",
36 srcs: [
Yuyang Huang6acc55e2023-08-22 13:45:18 +090037 "device/com/android/net/module/util/arp/ArpPacket.java",
Xiao Ma57b34422021-07-01 13:57:02 +000038 "device/com/android/net/module/util/DeviceConfigUtils.java",
fqjc86cece4012023-06-08 19:46:45 +080039 "device/com/android/net/module/util/DomainUtils.java",
Xiao Ma57b34422021-07-01 13:57:02 +000040 "device/com/android/net/module/util/FdEventsReader.java",
Xiao Ma1453c7c2022-07-15 12:08:48 +090041 "device/com/android/net/module/util/NetworkMonitorUtils.java",
Xiao Ma57b34422021-07-01 13:57:02 +000042 "device/com/android/net/module/util/PacketReader.java",
Chalard Jeanb61091b2021-10-07 15:29:13 +090043 "device/com/android/net/module/util/SharedLog.java",
chiachangwangf618ab02022-12-16 07:26:33 +000044 "device/com/android/net/module/util/SocketUtils.java",
chiachangwang16377302023-07-31 14:06:28 +000045 "device/com/android/net/module/util/FeatureVersions.java",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090046 // This library is used by system modules, for which the system health impact of Kotlin
Chalard Jean7592a342021-04-19 18:04:34 +090047 // has not yet been evaluated. Annotations may need jarjar'ing.
Chalard Jean48c6c7d2020-06-25 23:39:15 +090048 // "src_devicecommon/**/*.kt",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090049 ],
Chalard Jeand5802422021-10-27 19:02:14 +090050 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +000051 min_sdk_version: "30",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090052 target_sdk_version: "30",
53 apex_available: [
54 "//apex_available:anyapex",
55 "//apex_available:platform",
56 ],
57 visibility: [
58 "//frameworks/base/packages/Tethering",
Baligh Uddinf8c12822021-05-21 04:26:52 +000059 "//packages/modules/Connectivity:__subpackages__",
60 "//packages/modules/Connectivity/framework:__subpackages__",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090061 "//frameworks/opt/net/ike",
62 "//frameworks/opt/net/wifi/service",
Baligh Uddinfcbda3a2020-12-24 06:12:25 +000063 "//packages/modules/Wifi/service",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090064 "//frameworks/opt/net/telephony",
Xiao Ma6f95cef2020-09-08 19:16:15 +090065 "//packages/modules/NetworkStack:__subpackages__",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090066 "//packages/modules/CaptivePortalLogin",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090067 ],
Xiao Ma5c174542021-02-28 13:09:23 +000068 static_libs: [
69 "net-utils-framework-common",
70 ],
Chalard Jean48c6c7d2020-06-25 23:39:15 +090071 libs: [
72 "androidx.annotation_annotation",
Chalard Jeand5802422021-10-27 19:02:14 +090073 "framework-annotations-lib",
Hassan Ali47d424e2022-11-17 16:34:31 +000074 "framework-configinfrastructure",
Xiao Ma1453c7c2022-07-15 12:08:48 +090075 "framework-connectivity.stubs.module_lib",
Chalard Jean48c6c7d2020-06-25 23:39:15 +090076 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +090077 lint: {
78 strict_updatability_linting: true,
79 error_checks: ["NewApi"],
80 },
Chalard Jean48c6c7d2020-06-25 23:39:15 +090081}
82
Chalard Jean48c6c7d2020-06-25 23:39:15 +090083java_defaults {
84 name: "lib_mockito_extended",
85 static_libs: [
86 "mockito-target-extended-minus-junit4"
87 ],
88 jni_libs: [
89 "libdexmakerjvmtiagent",
90 "libstaticjvmtiagent",
91 ],
92}
93
Aswin Sankar601d6f92021-10-11 13:12:16 -070094java_library {
95 name: "net-utils-dnspacket-common",
96 srcs: [
97 "framework/**/DnsPacket.java",
98 "framework/**/DnsPacketUtils.java",
Mike Yu9b96c832023-09-18 08:26:08 +000099 "framework/**/DnsSvcbRecord.java",
100 "framework/**/HexDump.java",
101 "framework/**/NetworkStackConstants.java",
Aswin Sankar601d6f92021-10-11 13:12:16 -0700102 ],
103 sdk_version: "module_current",
104 visibility: [
105 "//packages/services/Iwlan:__subpackages__",
106 ],
Junyu Lai85e24e82022-09-15 07:34:51 +0000107 libs: [
Mike Yu9b96c832023-09-18 08:26:08 +0000108 "androidx.annotation_annotation",
Junyu Lai85e24e82022-09-15 07:34:51 +0000109 "framework-annotations-lib",
110 "framework-connectivity.stubs.module_lib",
111 ],
Aswin Sankar601d6f92021-10-11 13:12:16 -0700112}
113
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800114filegroup {
115 name: "net-utils-framework-common-srcs",
Chalard Jean48c6c7d2020-06-25 23:39:15 +0900116 srcs: ["framework/**/*.java"],
117 path: "framework",
Remi NGUYEN VAN651faf72021-03-24 22:40:37 +0900118 visibility: [
119 "//frameworks/base",
Baligh Uddin27e5fcd2021-05-22 13:16:30 +0000120 "//packages/modules/Connectivity:__subpackages__",
Remi NGUYEN VAN651faf72021-03-24 22:40:37 +0900121 ],
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800122}
123
124java_library {
markchienf3448f92021-11-10 01:06:51 +0800125 name: "net-utils-device-common-bpf",
Xiao Ma57b34422021-07-01 13:57:02 +0000126 srcs: [
Tyler Wear92f3c242022-02-15 15:21:43 -0800127 "device/com/android/net/module/util/BpfBitmap.java",
Hungming Chenb3e71a22022-06-23 21:34:54 +0800128 "device/com/android/net/module/util/BpfDump.java",
Tyler Wearaafd9c12021-10-19 11:01:46 -0700129 "device/com/android/net/module/util/BpfMap.java",
Tyler Weare48ee4a2022-02-15 15:30:50 -0800130 "device/com/android/net/module/util/BpfUtils.java",
markchien2e5fece2022-01-21 10:16:54 +0800131 "device/com/android/net/module/util/IBpfMap.java",
markchienf3448f92021-11-10 01:06:51 +0800132 "device/com/android/net/module/util/JniUtil.java",
markchienbe960362022-01-22 15:10:26 +0800133 "device/com/android/net/module/util/Struct.java",
Patrick Rohr29b0d952022-01-12 21:42:24 +0100134 "device/com/android/net/module/util/TcUtils.java",
Yuyang Huange4eb87a2023-05-02 18:44:51 +0900135 "framework/com/android/net/module/util/HexDump.java",
markchienf3448f92021-11-10 01:06:51 +0800136 ],
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900137 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +0000138 min_sdk_version: "30",
markchienf3448f92021-11-10 01:06:51 +0800139 visibility: [
markchienf3448f92021-11-10 01:06:51 +0800140 "//packages/modules/Connectivity:__subpackages__",
141 "//packages/modules/NetworkStack:__subpackages__",
142 ],
markchienf3448f92021-11-10 01:06:51 +0800143 libs: [
144 "androidx.annotation_annotation",
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900145 "framework-connectivity.stubs.module_lib",
markchienf3448f92021-11-10 01:06:51 +0800146 ],
147 apex_available: [
148 "com.android.tethering",
149 "//apex_available:platform",
150 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900151 lint: {
152 strict_updatability_linting: true,
153 error_checks: ["NewApi"],
154 },
markchienf3448f92021-11-10 01:06:51 +0800155}
156
157java_library {
158 name: "net-utils-device-common-struct",
159 srcs: [
Xiao Ma57b34422021-07-01 13:57:02 +0000160 "device/com/android/net/module/util/Ipv6Utils.java",
Hungming Chen435833f2021-09-14 20:26:27 +0800161 "device/com/android/net/module/util/PacketBuilder.java",
Xiao Ma57b34422021-07-01 13:57:02 +0000162 "device/com/android/net/module/util/Struct.java",
Xiao Ma57b34422021-07-01 13:57:02 +0000163 "device/com/android/net/module/util/structs/*.java",
164 ],
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900165 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +0000166 min_sdk_version: "30",
Xiao Ma57b34422021-07-01 13:57:02 +0000167 visibility: [
Xiao Ma57b34422021-07-01 13:57:02 +0000168 "//packages/modules/Connectivity:__subpackages__",
169 "//packages/modules/NetworkStack:__subpackages__",
170 ],
171 static_libs: [
172 "net-utils-framework-common",
173 ],
174 libs: [
175 "androidx.annotation_annotation",
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900176 "framework-connectivity.stubs.module_lib",
Xiao Ma57b34422021-07-01 13:57:02 +0000177 ],
178 apex_available: [
179 "com.android.tethering",
180 "//apex_available:platform",
181 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900182 lint: {
183 strict_updatability_linting: true,
184 error_checks: ["NewApi"],
185 },
Xiao Ma57b34422021-07-01 13:57:02 +0000186}
187
Junyu Lai626045a2023-08-28 18:49:44 +0800188// The net-utils-device-common-netlink library requires the callers to contain
189// net-utils-device-common-struct.
Xiao Ma57b34422021-07-01 13:57:02 +0000190java_library {
markchienf3448f92021-11-10 01:06:51 +0800191 name: "net-utils-device-common-netlink",
192 srcs: [
193 "device/com/android/net/module/util/netlink/*.java",
194 ],
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900195 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +0000196 min_sdk_version: "30",
markchienf3448f92021-11-10 01:06:51 +0800197 visibility: [
markchienf3448f92021-11-10 01:06:51 +0800198 "//packages/modules/Connectivity:__subpackages__",
199 "//packages/modules/NetworkStack:__subpackages__",
200 ],
markchienf3448f92021-11-10 01:06:51 +0800201 libs: [
202 "androidx.annotation_annotation",
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900203 "framework-connectivity.stubs.module_lib",
Junyu Lai626045a2023-08-28 18:49:44 +0800204 // For libraries which are statically linked in framework-connectivity, do not
205 // statically link here because callers of this library might already have a static
206 // version linked.
207 "net-utils-device-common-struct",
markchienf3448f92021-11-10 01:06:51 +0800208 ],
209 apex_available: [
210 "com.android.tethering",
211 "//apex_available:platform",
212 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900213 lint: {
214 strict_updatability_linting: true,
215 error_checks: ["NewApi"],
216 },
markchienf3448f92021-11-10 01:06:51 +0800217}
218
Junyu Lai626045a2023-08-28 18:49:44 +0800219// The net-utils-device-common-ip library requires the callers to contain
220// net-utils-device-common-struct.
markchienf3448f92021-11-10 01:06:51 +0800221java_library {
Chalard Jeanb61091b2021-10-07 15:29:13 +0900222 // TODO : this target should probably be folded into net-utils-device-common
223 name: "net-utils-device-common-ip",
224 srcs: [
225 "device/com/android/net/module/util/ip/*.java",
226 ],
227 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +0000228 min_sdk_version: "30",
Chalard Jeanb61091b2021-10-07 15:29:13 +0900229 visibility: [
Chalard Jeanb61091b2021-10-07 15:29:13 +0900230 "//packages/modules/Connectivity:__subpackages__",
231 "//packages/modules/NetworkStack:__subpackages__",
232 ],
233 libs: [
234 "framework-annotations-lib",
235 "framework-connectivity",
236 ],
237 static_libs: [
238 "net-utils-device-common",
239 "net-utils-device-common-netlink",
240 "net-utils-framework-common",
241 "netd-client",
242 ],
243 apex_available: [
244 "com.android.tethering",
245 "//apex_available:platform",
246 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900247 lint: {
248 strict_updatability_linting: true,
249 error_checks: ["NewApi"],
250 },
Chalard Jeanb61091b2021-10-07 15:29:13 +0900251}
252
253java_library {
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800254 name: "net-utils-framework-common",
Remi NGUYEN VANce241a32020-01-14 21:42:09 +0900255 srcs: [
256 ":net-utils-framework-common-srcs",
Remi NGUYEN VANce241a32020-01-14 21:42:09 +0900257 ],
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900258 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +0000259 min_sdk_version: "30",
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900260 libs: [
Jooyung Hanb3b67982022-06-24 14:56:24 +0900261 "androidx.annotation_annotation",
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900262 "framework-annotations-lib",
263 "framework-connectivity.stubs.module_lib",
paulhucdb069e2022-02-14 15:28:50 +0800264 "framework-connectivity-t.stubs.module_lib",
Mark White66d39cd2023-08-07 15:20:07 +0000265 "framework-location.stubs.module_lib",
Remi NGUYEN VAN7f0d0e32022-01-25 19:08:12 +0900266 ],
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800267 jarjar_rules: "jarjar-rules-shared.txt",
268 visibility: [
Luke Huangfd5479e2020-06-20 11:38:17 +0800269 "//cts/tests/tests/net",
Chalard Jeanceaf7d02020-06-26 18:34:52 +0900270 "//cts/tests/tests/wifi",
Baligh Uddine685c812020-10-31 04:28:58 +0000271 "//packages/modules/Connectivity/tests/cts/net",
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800272 "//frameworks/base/packages/Tethering",
Baligh Uddinae4770d2020-10-29 02:12:06 +0000273 "//packages/modules/Connectivity/Tethering",
Chalard Jeana9f49912020-10-15 18:06:30 +0900274 "//frameworks/base/tests:__subpackages__",
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800275 "//frameworks/opt/net/ike",
276 "//frameworks/opt/telephony",
Chalard Jean19789192020-10-01 12:45:31 +0900277 "//frameworks/base/wifi:__subpackages__",
Remi NGUYEN VAN38afb0c2020-11-10 18:04:27 +0900278 "//frameworks/base/packages/Connectivity:__subpackages__",
279 "//packages/modules/Connectivity:__subpackages__",
Chalard Jean48c6c7d2020-06-25 23:39:15 +0900280 "//packages/modules/NetworkStack:__subpackages__",
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800281 "//packages/modules/CaptivePortalLogin",
Baligh Uddinfcbda3a2020-12-24 06:12:25 +0000282 "//packages/modules/Wifi/framework/tests:__subpackages__",
Junyu Laib24df142022-01-10 10:31:11 +0000283 "//packages/apps/Settings",
Chalard Jean7592a342021-04-19 18:04:34 +0900284 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900285 lint: {
286 strict_updatability_linting: true,
287 error_checks: ["NewApi"],
288 },
Paul Hu8d47d842023-03-31 14:59:49 +0800289 errorprone: {
290 enabled: true,
291 // Error-prone checking only warns of problems when building. To make the build fail with
292 // these errors, list the specific error-prone problems below.
293 javacflags: [
294 "-Xep:NullablePrimitive:ERROR",
295 ],
296 },
Aaron Huangf73ff8c2019-12-06 18:12:24 +0800297}
Anton Hansson0ceeb7c2022-05-30 12:01:49 +0000298
299java_library {
300 name: "net-utils-services-common",
David Su2dbab642020-10-26 14:51:01 -0700301 srcs: [
302 "device/android/net/NetworkFactory.java",
Chalard Jean7592a342021-04-19 18:04:34 +0900303 "device/android/net/NetworkFactoryImpl.java",
304 "device/android/net/NetworkFactoryLegacyImpl.java",
305 "device/android/net/NetworkFactoryShim.java",
David Su2dbab642020-10-26 14:51:01 -0700306 ],
Chalard Jeand5802422021-10-27 19:02:14 +0900307 sdk_version: "module_current",
David Sudc0a5682021-01-29 04:42:27 +0000308 min_sdk_version: "30",
Chalard Jean7592a342021-04-19 18:04:34 +0900309 static_libs: [
310 "modules-utils-build_system",
311 ],
Chalard Jeand5802422021-10-27 19:02:14 +0900312 libs: [
313 "framework-annotations-lib",
314 "framework-connectivity",
315 ],
Xiao Ma2bbc2f72022-01-24 07:58:12 +0000316 // TODO: remove "apex_available:platform".
317 apex_available: [
318 "//apex_available:platform",
William Escandefbe576b2022-08-22 11:28:00 -0700319 "com.android.btservices",
Xiao Ma2bbc2f72022-01-24 07:58:12 +0000320 "com.android.tethering",
Anton Hansson0ceeb7c2022-05-30 12:01:49 +0000321 "com.android.wifi",
Xiao Ma2bbc2f72022-01-24 07:58:12 +0000322 ],
Aaron Huang57a94962020-01-03 20:35:55 +0800323 visibility: [
markchien32a6e9c2022-01-20 14:34:15 +0800324 // TODO: remove after NetworkStatsService moves to the module.
Remi NGUYEN VAN376f8d42020-01-15 18:26:29 +0900325 "//frameworks/base/services/net",
Xiao Ma2bbc2f72022-01-24 07:58:12 +0000326 "//packages/modules/Connectivity/service",
Remi NGUYEN VAN0cf724a2021-11-19 18:33:12 +0900327 "//packages/modules/Connectivity/tests:__subpackages__",
Roopa Sattiraju98fa3bf2022-02-03 18:53:23 -0800328 "//packages/modules/Bluetooth/android/app",
Nate(Qiang) Jiangce723aa2022-06-01 21:28:32 +0000329 "//packages/modules/Wifi/service:__subpackages__",
Aaron Huang57a94962020-01-03 20:35:55 +0800330 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900331 lint: {
332 strict_updatability_linting: true,
333 error_checks: ["NewApi"],
334 },
Aaron Huang57a94962020-01-03 20:35:55 +0800335}
Lorenzo Colittie14bd342020-01-14 14:47:16 +0900336
Igor Chernysheva25f1092022-12-20 00:07:38 -0800337java_library {
338 name: "net-utils-device-common-async",
339 srcs: [
340 "device/com/android/net/module/util/async/*.java",
341 ],
342 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +0000343 min_sdk_version: "30",
Igor Chernysheva25f1092022-12-20 00:07:38 -0800344 visibility: [
Igor Chernysheva25f1092022-12-20 00:07:38 -0800345 "//packages/modules/Connectivity:__subpackages__",
346 ],
347 libs: [
348 "framework-annotations-lib",
349 ],
350 static_libs: [
351 ],
352 apex_available: [
353 "com.android.tethering",
354 "//apex_available:platform",
355 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900356 lint: {
357 strict_updatability_linting: true,
358 error_checks: ["NewApi"],
359 },
Igor Chernysheva25f1092022-12-20 00:07:38 -0800360}
361
Igor Chernyshev810be2b2023-04-06 15:52:26 -0700362java_library {
363 name: "net-utils-device-common-wear",
364 srcs: [
365 "device/com/android/net/module/util/wear/*.java",
366 ],
367 sdk_version: "module_current",
Maciej Żenczykowski127a1442023-09-19 23:17:10 +0000368 min_sdk_version: "30",
Igor Chernyshev810be2b2023-04-06 15:52:26 -0700369 visibility: [
Igor Chernyshev810be2b2023-04-06 15:52:26 -0700370 "//packages/modules/Connectivity:__subpackages__",
371 ],
372 libs: [
373 "framework-annotations-lib",
374 ],
375 static_libs: [
376 "net-utils-device-common-async",
377 ],
378 apex_available: [
379 "com.android.tethering",
380 "//apex_available:platform",
381 ],
Motomu Utsumi195a30f2023-09-27 16:03:30 +0900382 lint: {
383 strict_updatability_linting: true,
384 error_checks: ["NewApi"],
385 },
Igor Chernyshev810be2b2023-04-06 15:52:26 -0700386}
387
Yuyang Huangf67388b2023-03-29 16:51:09 +0900388// Limited set of utilities for use by service-connectivity-mdns-standalone-build-test, to make sure
389// the mDNS code can build with only system APIs.
390// The mDNS code is platform code so it should use framework-annotations-lib, contrary to apps that
391// should use sdk_version: "system_current" and only androidx.annotation_annotation. But this build
392// rule verifies that the mDNS code can be built into apps, if code transformations are applied to
393// the annotations.
394// When using "system_current", framework annotations are not available; they would appear as
395// package-private as they are marked as such in the system_current stubs. So build against
396// core_platform and add the stubs manually in "libs". See http://b/147773144#comment7.
397java_library {
398 name: "net-utils-device-common-mdns-standalone-build-test",
399 // Build against core_platform and add the stub libraries manually in "libs", as annotations
400 // are already included in android_system_stubs_current but package-private, so
401 // "framework-annotations-lib" needs to be manually included before
402 // "android_system_stubs_current" (b/272392042)
403 sdk_version: "core_platform",
404 srcs: [
405 "device/com/android/net/module/util/FdEventsReader.java",
Yuyang Huangf67388b2023-03-29 16:51:09 +0900406 "device/com/android/net/module/util/SharedLog.java",
407 "framework/com/android/net/module/util/ByteUtils.java",
408 "framework/com/android/net/module/util/CollectionUtils.java",
Yuyang Huange4eb87a2023-05-02 18:44:51 +0900409 "framework/com/android/net/module/util/HexDump.java",
Yuyang Huangf67388b2023-03-29 16:51:09 +0900410 "framework/com/android/net/module/util/LinkPropertiesUtils.java",
411 ],
412 libs: [
413 "framework-annotations-lib",
414 "android_system_stubs_current",
415 "androidx.annotation_annotation",
416 ],
417 visibility: ["//packages/modules/Connectivity/service-t"],
418}
419
Lorenzo Colittie14bd342020-01-14 14:47:16 +0900420// Use a filegroup and not a library for telephony sources, as framework-annotations cannot be
421// included either (some annotations would be duplicated on the bootclasspath).
422filegroup {
423 name: "net-utils-telephony-common-srcs",
424 srcs: [
425 // Any class here *must* have a corresponding jarjar rule in the telephony build rules.
Chalard Jean48c6c7d2020-06-25 23:39:15 +0900426 "device/android/net/NetworkFactory.java",
Chalard Jean7592a342021-04-19 18:04:34 +0900427 "device/android/net/NetworkFactoryImpl.java",
428 "device/android/net/NetworkFactoryLegacyImpl.java",
429 "device/android/net/NetworkFactoryShim.java",
Lorenzo Colittie14bd342020-01-14 14:47:16 +0900430 ],
Chalard Jean48c6c7d2020-06-25 23:39:15 +0900431 path: "device",
Lorenzo Colittie14bd342020-01-14 14:47:16 +0900432 visibility: [
433 "//frameworks/opt/telephony",
434 ],
435}
Roshan Pius864bdec2020-01-16 09:19:11 -0800436
437// Use a filegroup and not a library for wifi sources, as this needs corresponding jar-jar
438// rules on the wifi side.
439// Any class here *must* have a corresponding jarjar rule in the wifi build rules.
440filegroup {
441 name: "net-utils-framework-wifi-common-srcs",
442 srcs: [
Chalard Jeanb61091b2021-10-07 15:29:13 +0900443 "framework/com/android/net/module/util/DnsSdTxtRecord.java",
444 "framework/com/android/net/module/util/Inet4AddressUtils.java",
445 "framework/com/android/net/module/util/InetAddressUtils.java",
446 "framework/com/android/net/module/util/MacAddressUtils.java",
447 "framework/com/android/net/module/util/NetUtils.java",
Roshan Pius864bdec2020-01-16 09:19:11 -0800448 ],
Chalard Jean48c6c7d2020-06-25 23:39:15 +0900449 path: "framework",
Roshan Pius864bdec2020-01-16 09:19:11 -0800450 visibility: [
451 "//frameworks/base",
452 ],
453}
454
455// Use a filegroup and not a library for wifi sources, as this needs corresponding jar-jar
456// rules on the wifi side.
457// Any class here *must* have a corresponding jarjar rule in the wifi build rules.
458filegroup {
459 name: "net-utils-wifi-service-common-srcs",
460 srcs: [
Chalard Jean48c6c7d2020-06-25 23:39:15 +0900461 "device/android/net/NetworkFactory.java",
Chalard Jean7592a342021-04-19 18:04:34 +0900462 "device/android/net/NetworkFactoryImpl.java",
463 "device/android/net/NetworkFactoryLegacyImpl.java",
464 "device/android/net/NetworkFactoryShim.java",
Roshan Pius864bdec2020-01-16 09:19:11 -0800465 ],
466 visibility: [
467 "//frameworks/opt/net/wifi/service",
Baligh Uddinfcbda3a2020-12-24 06:12:25 +0000468 "//packages/modules/Wifi/service",
Roshan Pius864bdec2020-01-16 09:19:11 -0800469 ],
470}