| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 1 | // 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 Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 15 | // 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 Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 20 | // 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 Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 25 | |
| Adrian Roos | 0607dd9 | 2020-03-27 00:30:41 +0100 | [diff] [blame] | 26 | // 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 Badour | 1b8c744 | 2021-02-12 15:39:10 -0800 | [diff] [blame] | 30 | package { |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 31 | default_team: "trendy_team_fwk_core_networking", |
| Bob Badour | 1b8c744 | 2021-02-12 15:39:10 -0800 | [diff] [blame] | 32 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 33 | } |
| 34 | |
| Paul Hu | 8c8d2b1 | 2024-10-15 15:59:31 +0000 | [diff] [blame] | 35 | // This library shouldn't be used anymore (no class should be added), and per-user libraries like |
| 36 | // net-utils-service-connectivity or net-utils-framework-wifi should be used instead. |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 37 | java_library { |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 38 | name: "net-utils-device-common", |
| 39 | srcs: [ |
| 40 | "device/com/android/net/module/util/arp/ArpPacket.java", |
| 41 | "device/com/android/net/module/util/DeviceConfigUtils.java", |
| 42 | "device/com/android/net/module/util/DomainUtils.java", |
| 43 | "device/com/android/net/module/util/FdEventsReader.java", |
| Patrick Rohr | aa06b2b | 2024-06-17 14:18:36 -0700 | [diff] [blame] | 44 | "device/com/android/net/module/util/FeatureVersions.java", |
| 45 | "device/com/android/net/module/util/HandlerUtils.java", |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 46 | "device/com/android/net/module/util/NetworkMonitorUtils.java", |
| 47 | "device/com/android/net/module/util/PacketReader.java", |
| 48 | "device/com/android/net/module/util/SharedLog.java", |
| 49 | "device/com/android/net/module/util/SocketUtils.java", |
| Patrick Rohr | aa06b2b | 2024-06-17 14:18:36 -0700 | [diff] [blame] | 50 | "device/com/android/net/module/util/SyncStateMachine.java", |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 51 | // This library is used by system modules, for which the system health impact of Kotlin |
| 52 | // has not yet been evaluated. Annotations may need jarjar'ing. |
| 53 | // "src_devicecommon/**/*.kt", |
| 54 | ], |
| 55 | sdk_version: "module_current", |
| 56 | min_sdk_version: "30", |
| 57 | target_sdk_version: "30", |
| 58 | apex_available: [ |
| 59 | "//apex_available:anyapex", |
| 60 | "//apex_available:platform", |
| 61 | ], |
| 62 | visibility: [ |
| Baligh Uddin | f8c1282 | 2021-05-21 04:26:52 +0000 | [diff] [blame] | 63 | "//packages/modules/Connectivity:__subpackages__", |
| 64 | "//packages/modules/Connectivity/framework:__subpackages__", |
| Xiao Ma | 6f95cef | 2020-09-08 19:16:15 +0900 | [diff] [blame] | 65 | "//packages/modules/NetworkStack:__subpackages__", |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 66 | "//packages/modules/CaptivePortalLogin", |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 67 | ], |
| 68 | static_libs: [ |
| Patrick Rohr | aa06b2b | 2024-06-17 14:18:36 -0700 | [diff] [blame] | 69 | "modules-utils-statemachine", |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 70 | "net-utils-framework-common", |
| 71 | ], |
| 72 | libs: [ |
| 73 | "androidx.annotation_annotation", |
| 74 | "framework-annotations-lib", |
| Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 75 | "framework-configinfrastructure.stubs.module_lib", |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 76 | "framework-connectivity.stubs.module_lib", |
| 77 | ], |
| 78 | lint: { |
| 79 | strict_updatability_linting: true, |
| 80 | error_checks: ["NewApi"], |
| 81 | }, |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 82 | } |
| 83 | |
| Patrick Rohr | 259c0b4 | 2025-04-10 15:55:30 -0700 | [diff] [blame] | 84 | // Contains staticlibs classes for use by NetworkStack |
| 85 | java_library { |
| 86 | name: "net-utils-networkstack", |
| 87 | srcs: [ |
| 88 | "device/com/android/net/module/util/ProcfsParsingUtils.java", |
| Patrick Rohr | f5e80bf | 2025-05-01 10:47:02 -0700 | [diff] [blame] | 89 | "device/com/android/net/module/util/dhcp6/*.java", |
| Jimi Chen | e5a4e6b | 2025-06-11 23:46:57 +0000 | [diff] [blame] | 90 | "device/com/android/net/module/util/CommonConnectivityJni.java", |
| 91 | "device/com/android/net/module/util/RealtimeScheduler.java", |
| 92 | "device/com/android/net/module/util/TimerFdUtils.java", |
| 93 | "device/com/android/net/module/util/JniUtil.java", |
| Patrick Rohr | 259c0b4 | 2025-04-10 15:55:30 -0700 | [diff] [blame] | 94 | "framework/com/android/net/module/util/HexDump.java", |
| 95 | ], |
| 96 | sdk_version: "module_current", |
| 97 | min_sdk_version: "30", |
| 98 | target_sdk_version: "30", |
| 99 | visibility: [ |
| 100 | "//packages/modules/Connectivity/tests:__subpackages__", |
| 101 | "//packages/modules/NetworkStack:__subpackages__", |
| 102 | ], |
| 103 | libs: [ |
| 104 | "androidx.annotation_annotation", |
| 105 | "framework-annotations-lib", |
| 106 | "framework-connectivity.stubs.module_lib", |
| Patrick Rohr | f5e80bf | 2025-05-01 10:47:02 -0700 | [diff] [blame] | 107 | "net-utils-device-common-struct", |
| 108 | "net-utils-device-common-struct-base", |
| Patrick Rohr | 259c0b4 | 2025-04-10 15:55:30 -0700 | [diff] [blame] | 109 | ], |
| 110 | } |
| 111 | |
| Aswin Sankar | 601d6f9 | 2021-10-11 13:12:16 -0700 | [diff] [blame] | 112 | java_library { |
| 113 | name: "net-utils-dnspacket-common", |
| 114 | srcs: [ |
| Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 115 | "framework/**/DnsPacket.java", |
| 116 | "framework/**/DnsPacketUtils.java", |
| 117 | "framework/**/DnsSvcbPacket.java", |
| 118 | "framework/**/DnsSvcbRecord.java", |
| 119 | "framework/**/HexDump.java", |
| 120 | "framework/**/NetworkStackConstants.java", |
| Aswin Sankar | 601d6f9 | 2021-10-11 13:12:16 -0700 | [diff] [blame] | 121 | ], |
| 122 | sdk_version: "module_current", |
| 123 | visibility: [ |
| 124 | "//packages/services/Iwlan:__subpackages__", |
| 125 | ], |
| Junyu Lai | 85e24e8 | 2022-09-15 07:34:51 +0000 | [diff] [blame] | 126 | libs: [ |
| Mike Yu | 9b96c83 | 2023-09-18 08:26:08 +0000 | [diff] [blame] | 127 | "androidx.annotation_annotation", |
| Junyu Lai | 85e24e8 | 2022-09-15 07:34:51 +0000 | [diff] [blame] | 128 | "framework-annotations-lib", |
| 129 | "framework-connectivity.stubs.module_lib", |
| 130 | ], |
| Aswin Sankar | 601d6f9 | 2021-10-11 13:12:16 -0700 | [diff] [blame] | 131 | } |
| 132 | |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 133 | filegroup { |
| 134 | name: "net-utils-framework-common-srcs", |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 135 | srcs: ["framework/**/*.java"], |
| 136 | path: "framework", |
| Remi NGUYEN VAN | 651faf7 | 2021-03-24 22:40:37 +0900 | [diff] [blame] | 137 | visibility: [ |
| 138 | "//frameworks/base", |
| Baligh Uddin | 27e5fcd | 2021-05-22 13:16:30 +0000 | [diff] [blame] | 139 | "//packages/modules/Connectivity:__subpackages__", |
| Remi NGUYEN VAN | 651faf7 | 2021-03-24 22:40:37 +0900 | [diff] [blame] | 140 | ], |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 141 | } |
| 142 | |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 143 | // The net-utils-device-common-bpf library requires the callers to contain |
| 144 | // net-utils-device-common-struct-base. |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 145 | java_library { |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 146 | name: "net-utils-device-common-bpf", |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 147 | srcs: [ |
| Tyler Wear | 92f3c24 | 2022-02-15 15:21:43 -0800 | [diff] [blame] | 148 | "device/com/android/net/module/util/BpfBitmap.java", |
| Hungming Chen | b3e71a2 | 2022-06-23 21:34:54 +0800 | [diff] [blame] | 149 | "device/com/android/net/module/util/BpfDump.java", |
| Tyler Wear | aafd9c1 | 2021-10-19 11:01:46 -0700 | [diff] [blame] | 150 | "device/com/android/net/module/util/BpfMap.java", |
| Tyler Wear | e48ee4a | 2022-02-15 15:30:50 -0800 | [diff] [blame] | 151 | "device/com/android/net/module/util/BpfUtils.java", |
| markchien | 2e5fece | 2022-01-21 10:16:54 +0800 | [diff] [blame] | 152 | "device/com/android/net/module/util/IBpfMap.java", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 153 | "device/com/android/net/module/util/JniUtil.java", |
| Lorenzo Colitti | 05be2f5 | 2024-06-02 13:24:21 +0900 | [diff] [blame] | 154 | "device/com/android/net/module/util/SingleWriterBpfMap.java", |
| Patrick Rohr | 29b0d95 | 2022-01-12 21:42:24 +0100 | [diff] [blame] | 155 | "device/com/android/net/module/util/TcUtils.java", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 156 | ], |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 157 | sdk_version: "module_current", |
| Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 158 | min_sdk_version: "30", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 159 | visibility: [ |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 160 | "//packages/modules/Connectivity:__subpackages__", |
| 161 | "//packages/modules/NetworkStack:__subpackages__", |
| 162 | ], |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 163 | libs: [ |
| 164 | "androidx.annotation_annotation", |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 165 | "framework-connectivity.stubs.module_lib", |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 166 | "net-utils-device-common-struct-base", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 167 | ], |
| 168 | apex_available: [ |
| 169 | "com.android.tethering", |
| 170 | "//apex_available:platform", |
| 171 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 172 | lint: { |
| 173 | strict_updatability_linting: true, |
| 174 | error_checks: ["NewApi"], |
| 175 | }, |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | java_library { |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 179 | name: "net-utils-device-common-struct-base", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 180 | srcs: [ |
| Patrick Rohr | 62d51d1 | 2025-07-28 12:44:32 -0700 | [diff] [blame] | 181 | "device/com/android/net/module/util/LegacyStruct.java", |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 182 | "device/com/android/net/module/util/Struct.java", |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 183 | ], |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 184 | sdk_version: "module_current", |
| Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 185 | min_sdk_version: "30", |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 186 | visibility: [ |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 187 | "//packages/modules/Connectivity:__subpackages__", |
| 188 | "//packages/modules/NetworkStack:__subpackages__", |
| 189 | ], |
| 190 | static_libs: [ |
| 191 | "net-utils-framework-common", |
| 192 | ], |
| 193 | libs: [ |
| 194 | "androidx.annotation_annotation", |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 195 | "framework-annotations-lib", // Required by InetAddressUtils.java |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 196 | "framework-connectivity.stubs.module_lib", |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 197 | ], |
| 198 | apex_available: [ |
| 199 | "com.android.tethering", |
| 200 | "//apex_available:platform", |
| 201 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 202 | lint: { |
| 203 | strict_updatability_linting: true, |
| 204 | error_checks: ["NewApi"], |
| 205 | }, |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 206 | } |
| 207 | |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 208 | // The net-utils-device-common-struct library requires the callers to contain |
| 209 | // net-utils-device-common-struct-base. |
| Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 210 | java_library { |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 211 | name: "net-utils-device-common-struct", |
| Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 212 | srcs: [ |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 213 | "device/com/android/net/module/util/Ipv6Utils.java", |
| 214 | "device/com/android/net/module/util/PacketBuilder.java", |
| 215 | "device/com/android/net/module/util/structs/*.java", |
| Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 216 | ], |
| 217 | sdk_version: "module_current", |
| 218 | min_sdk_version: "30", |
| 219 | visibility: [ |
| 220 | "//packages/modules/Connectivity:__subpackages__", |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 221 | "//packages/modules/NetworkStack:__subpackages__", |
| Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 222 | ], |
| 223 | libs: [ |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 224 | "androidx.annotation_annotation", |
| 225 | "framework-annotations-lib", // Required by IpUtils.java |
| 226 | "framework-connectivity.stubs.module_lib", |
| 227 | "net-utils-device-common-struct-base", |
| Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 228 | ], |
| 229 | apex_available: [ |
| 230 | "com.android.tethering", |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 231 | "//apex_available:platform", |
| Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 232 | ], |
| 233 | lint: { |
| 234 | strict_updatability_linting: true, |
| 235 | error_checks: ["NewApi"], |
| 236 | }, |
| 237 | } |
| 238 | |
| Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 239 | // The net-utils-device-common-netlink library requires the callers to contain |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 240 | // net-utils-device-common-struct and net-utils-device-common-struct-base. |
| Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 241 | java_library { |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 242 | name: "net-utils-device-common-netlink", |
| 243 | srcs: [ |
| Yan Yan | f085fad | 2023-11-20 18:51:30 +0000 | [diff] [blame] | 244 | "device/com/android/net/module/util/netlink/**/*.java", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 245 | ], |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 246 | sdk_version: "module_current", |
| Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 247 | min_sdk_version: "30", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 248 | visibility: [ |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 249 | "//packages/modules/Connectivity:__subpackages__", |
| 250 | "//packages/modules/NetworkStack:__subpackages__", |
| 251 | ], |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 252 | libs: [ |
| 253 | "androidx.annotation_annotation", |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 254 | "framework-connectivity.stubs.module_lib", |
| Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 255 | // For libraries which are statically linked in framework-connectivity, do not |
| 256 | // statically link here because callers of this library might already have a static |
| 257 | // version linked. |
| 258 | "net-utils-device-common-struct", |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 259 | "net-utils-device-common-struct-base", |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 260 | ], |
| Sewook Seo | 4516385 | 2024-11-17 22:38:48 +0000 | [diff] [blame] | 261 | static_libs: [ |
| 262 | "netd_aidl_interface-lateststable-java", |
| 263 | ], |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 264 | apex_available: [ |
| 265 | "com.android.tethering", |
| 266 | "//apex_available:platform", |
| 267 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 268 | lint: { |
| 269 | strict_updatability_linting: true, |
| 270 | error_checks: ["NewApi"], |
| 271 | }, |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 272 | } |
| 273 | |
| Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 274 | // The net-utils-device-common-ip library requires the callers to contain |
| Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 275 | // net-utils-device-common-struct and net-utils-device-common-struct-base. |
| markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 276 | java_library { |
| Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 277 | // TODO : this target should probably be folded into net-utils-device-common |
| 278 | name: "net-utils-device-common-ip", |
| 279 | srcs: [ |
| 280 | "device/com/android/net/module/util/ip/*.java", |
| 281 | ], |
| 282 | sdk_version: "module_current", |
| Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 283 | min_sdk_version: "30", |
| Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 284 | visibility: [ |
| Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 285 | "//packages/modules/Connectivity:__subpackages__", |
| 286 | "//packages/modules/NetworkStack:__subpackages__", |
| 287 | ], |
| 288 | libs: [ |
| 289 | "framework-annotations-lib", |
| Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 290 | "framework-connectivity.stubs.module_lib", |
| Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 291 | ], |
| 292 | static_libs: [ |
| 293 | "net-utils-device-common", |
| 294 | "net-utils-device-common-netlink", |
| 295 | "net-utils-framework-common", |
| 296 | "netd-client", |
| 297 | ], |
| 298 | apex_available: [ |
| 299 | "com.android.tethering", |
| 300 | "//apex_available:platform", |
| 301 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 302 | lint: { |
| Motomu Utsumi | a1a0034 | 2024-06-13 09:29:47 +0000 | [diff] [blame] | 303 | strict_updatability_linting: true, |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 304 | error_checks: ["NewApi"], |
| 305 | }, |
| Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 306 | } |
| 307 | |
| 308 | java_library { |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 309 | name: "net-utils-framework-common", |
| Remi NGUYEN VAN | ce241a3 | 2020-01-14 21:42:09 +0900 | [diff] [blame] | 310 | srcs: [ |
| 311 | ":net-utils-framework-common-srcs", |
| Remi NGUYEN VAN | ce241a3 | 2020-01-14 21:42:09 +0900 | [diff] [blame] | 312 | ], |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 313 | sdk_version: "module_current", |
| Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 314 | min_sdk_version: "30", |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 315 | libs: [ |
| Jooyung Han | b3b6798 | 2022-06-24 14:56:24 +0900 | [diff] [blame] | 316 | "androidx.annotation_annotation", |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 317 | "framework-annotations-lib", |
| 318 | "framework-connectivity.stubs.module_lib", |
| paulhu | cdb069e | 2022-02-14 15:28:50 +0800 | [diff] [blame] | 319 | "framework-connectivity-t.stubs.module_lib", |
| Mark White | 66d39cd | 2023-08-07 15:20:07 +0000 | [diff] [blame] | 320 | "framework-location.stubs.module_lib", |
| Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 321 | ], |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 322 | jarjar_rules: "jarjar-rules-shared.txt", |
| 323 | visibility: [ |
| Luke Huang | fd5479e | 2020-06-20 11:38:17 +0800 | [diff] [blame] | 324 | "//cts/tests/tests/net", |
| Chalard Jean | ceaf7d0 | 2020-06-26 18:34:52 +0900 | [diff] [blame] | 325 | "//cts/tests/tests/wifi", |
| Baligh Uddin | e685c81 | 2020-10-31 04:28:58 +0000 | [diff] [blame] | 326 | "//packages/modules/Connectivity/tests/cts/net", |
| Baligh Uddin | ae4770d | 2020-10-29 02:12:06 +0000 | [diff] [blame] | 327 | "//packages/modules/Connectivity/Tethering", |
| Chalard Jean | a9f4991 | 2020-10-15 18:06:30 +0900 | [diff] [blame] | 328 | "//frameworks/base/tests:__subpackages__", |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 329 | "//frameworks/opt/net/ike", |
| 330 | "//frameworks/opt/telephony", |
| Chalard Jean | 1978919 | 2020-10-01 12:45:31 +0900 | [diff] [blame] | 331 | "//frameworks/base/wifi:__subpackages__", |
| Remi NGUYEN VAN | 38afb0c | 2020-11-10 18:04:27 +0900 | [diff] [blame] | 332 | "//packages/modules/Connectivity:__subpackages__", |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 333 | "//packages/modules/NetworkStack:__subpackages__", |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 334 | "//packages/modules/CaptivePortalLogin", |
| Baligh Uddin | fcbda3a | 2020-12-24 06:12:25 +0000 | [diff] [blame] | 335 | "//packages/modules/Wifi/framework/tests:__subpackages__", |
| Junyu Lai | b24df14 | 2022-01-10 10:31:11 +0000 | [diff] [blame] | 336 | "//packages/apps/Settings", |
| Chalard Jean | 7592a34 | 2021-04-19 18:04:34 +0900 | [diff] [blame] | 337 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 338 | lint: { |
| 339 | strict_updatability_linting: true, |
| 340 | error_checks: ["NewApi"], |
| 341 | }, |
| Paul Hu | 8d47d84 | 2023-03-31 14:59:49 +0800 | [diff] [blame] | 342 | errorprone: { |
| 343 | enabled: true, |
| 344 | // Error-prone checking only warns of problems when building. To make the build fail with |
| 345 | // these errors, list the specific error-prone problems below. |
| 346 | javacflags: [ |
| 347 | "-Xep:NullablePrimitive:ERROR", |
| 348 | ], |
| 349 | }, |
| Spandan Das | 2b83e77 | 2023-12-21 20:46:31 +0000 | [diff] [blame] | 350 | apex_available: [ |
| 351 | "//apex_available:platform", |
| 352 | "com.android.tethering", |
| 353 | ], |
| Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 354 | } |
| Anton Hansson | 0ceeb7c | 2022-05-30 12:01:49 +0000 | [diff] [blame] | 355 | |
| 356 | java_library { |
| 357 | name: "net-utils-services-common", |
| David Su | 2dbab64 | 2020-10-26 14:51:01 -0700 | [diff] [blame] | 358 | srcs: [ |
| 359 | "device/android/net/NetworkFactory.java", |
| Chalard Jean | 7592a34 | 2021-04-19 18:04:34 +0900 | [diff] [blame] | 360 | "device/android/net/NetworkFactoryImpl.java", |
| 361 | "device/android/net/NetworkFactoryLegacyImpl.java", |
| 362 | "device/android/net/NetworkFactoryShim.java", |
| David Su | 2dbab64 | 2020-10-26 14:51:01 -0700 | [diff] [blame] | 363 | ], |
| Chalard Jean | d580242 | 2021-10-27 19:02:14 +0900 | [diff] [blame] | 364 | sdk_version: "module_current", |
| David Su | dc0a568 | 2021-01-29 04:42:27 +0000 | [diff] [blame] | 365 | min_sdk_version: "30", |
| Chalard Jean | d580242 | 2021-10-27 19:02:14 +0900 | [diff] [blame] | 366 | libs: [ |
| 367 | "framework-annotations-lib", |
| Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 368 | "framework-connectivity.stubs.module_lib", |
| William Escande | 51c0be5 | 2024-07-10 14:26:50 -0700 | [diff] [blame] | 369 | "modules-utils-build_system", |
| Chalard Jean | d580242 | 2021-10-27 19:02:14 +0900 | [diff] [blame] | 370 | ], |
| Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 371 | // TODO: remove "apex_available:platform". |
| 372 | apex_available: [ |
| 373 | "//apex_available:platform", |
| William Escande | b82afa3 | 2025-01-09 12:25:16 -0800 | [diff] [blame] | 374 | "com.android.bt", |
| Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 375 | "com.android.tethering", |
| Anton Hansson | 0ceeb7c | 2022-05-30 12:01:49 +0000 | [diff] [blame] | 376 | "com.android.wifi", |
| Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 377 | ], |
| Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 378 | visibility: [ |
| markchien | 32a6e9c | 2022-01-20 14:34:15 +0800 | [diff] [blame] | 379 | // TODO: remove after NetworkStatsService moves to the module. |
| Remi NGUYEN VAN | 376f8d4 | 2020-01-15 18:26:29 +0900 | [diff] [blame] | 380 | "//frameworks/base/services/net", |
| Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 381 | "//packages/modules/Connectivity/service", |
| Remi NGUYEN VAN | 0cf724a | 2021-11-19 18:33:12 +0900 | [diff] [blame] | 382 | "//packages/modules/Connectivity/tests:__subpackages__", |
| Roopa Sattiraju | 98fa3bf | 2022-02-03 18:53:23 -0800 | [diff] [blame] | 383 | "//packages/modules/Bluetooth/android/app", |
| Nate(Qiang) Jiang | ce723aa | 2022-06-01 21:28:32 +0000 | [diff] [blame] | 384 | "//packages/modules/Wifi/service:__subpackages__", |
| Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 385 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 386 | lint: { |
| 387 | strict_updatability_linting: true, |
| 388 | error_checks: ["NewApi"], |
| 389 | }, |
| Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 390 | } |
| Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 391 | |
| Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 392 | java_library { |
| 393 | name: "net-utils-device-common-async", |
| 394 | srcs: [ |
| 395 | "device/com/android/net/module/util/async/*.java", |
| 396 | ], |
| 397 | sdk_version: "module_current", |
| Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 398 | min_sdk_version: "30", |
| Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 399 | visibility: [ |
| Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 400 | "//packages/modules/Connectivity:__subpackages__", |
| 401 | ], |
| 402 | libs: [ |
| 403 | "framework-annotations-lib", |
| 404 | ], |
| 405 | static_libs: [ |
| 406 | ], |
| 407 | apex_available: [ |
| 408 | "com.android.tethering", |
| 409 | "//apex_available:platform", |
| 410 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 411 | lint: { |
| 412 | strict_updatability_linting: true, |
| 413 | error_checks: ["NewApi"], |
| 414 | }, |
| Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 415 | } |
| 416 | |
| Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 417 | java_library { |
| 418 | name: "net-utils-device-common-wear", |
| 419 | srcs: [ |
| 420 | "device/com/android/net/module/util/wear/*.java", |
| 421 | ], |
| 422 | sdk_version: "module_current", |
| Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 423 | min_sdk_version: "30", |
| Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 424 | visibility: [ |
| Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 425 | "//packages/modules/Connectivity:__subpackages__", |
| 426 | ], |
| 427 | libs: [ |
| 428 | "framework-annotations-lib", |
| 429 | ], |
| 430 | static_libs: [ |
| 431 | "net-utils-device-common-async", |
| 432 | ], |
| 433 | apex_available: [ |
| 434 | "com.android.tethering", |
| 435 | "//apex_available:platform", |
| 436 | ], |
| Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 437 | lint: { |
| 438 | strict_updatability_linting: true, |
| 439 | error_checks: ["NewApi"], |
| 440 | }, |
| Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 441 | } |
| 442 | |
| Yuyang Huang | f67388b | 2023-03-29 16:51:09 +0900 | [diff] [blame] | 443 | // Limited set of utilities for use by service-connectivity-mdns-standalone-build-test, to make sure |
| 444 | // the mDNS code can build with only system APIs. |
| 445 | // The mDNS code is platform code so it should use framework-annotations-lib, contrary to apps that |
| 446 | // should use sdk_version: "system_current" and only androidx.annotation_annotation. But this build |
| 447 | // rule verifies that the mDNS code can be built into apps, if code transformations are applied to |
| 448 | // the annotations. |
| 449 | // When using "system_current", framework annotations are not available; they would appear as |
| 450 | // package-private as they are marked as such in the system_current stubs. So build against |
| 451 | // core_platform and add the stubs manually in "libs". See http://b/147773144#comment7. |
| 452 | java_library { |
| 453 | name: "net-utils-device-common-mdns-standalone-build-test", |
| 454 | // Build against core_platform and add the stub libraries manually in "libs", as annotations |
| 455 | // are already included in android_system_stubs_current but package-private, so |
| 456 | // "framework-annotations-lib" needs to be manually included before |
| 457 | // "android_system_stubs_current" (b/272392042) |
| 458 | sdk_version: "core_platform", |
| 459 | srcs: [ |
| 460 | "device/com/android/net/module/util/FdEventsReader.java", |
| Paul Hu | 7871320 | 2024-08-01 15:12:10 +0000 | [diff] [blame] | 461 | "device/com/android/net/module/util/HandlerUtils.java", |
| Yuyang Huang | f67388b | 2023-03-29 16:51:09 +0900 | [diff] [blame] | 462 | "device/com/android/net/module/util/SharedLog.java", |
| 463 | "framework/com/android/net/module/util/ByteUtils.java", |
| 464 | "framework/com/android/net/module/util/CollectionUtils.java", |
| Yuyang Huang | d851a04 | 2024-07-16 18:48:43 +0900 | [diff] [blame] | 465 | "framework/com/android/net/module/util/DnsUtils.java", |
| Yuyang Huang | e4eb87a | 2023-05-02 18:44:51 +0900 | [diff] [blame] | 466 | "framework/com/android/net/module/util/HexDump.java", |
| Yuyang Huang | f67388b | 2023-03-29 16:51:09 +0900 | [diff] [blame] | 467 | "framework/com/android/net/module/util/LinkPropertiesUtils.java", |
| 468 | ], |
| 469 | libs: [ |
| 470 | "framework-annotations-lib", |
| 471 | "android_system_stubs_current", |
| 472 | "androidx.annotation_annotation", |
| 473 | ], |
| 474 | visibility: ["//packages/modules/Connectivity/service-t"], |
| 475 | } |
| 476 | |
| Handa Wang | 8be10bf | 2024-08-08 15:36:48 +0000 | [diff] [blame] | 477 | // net-utils-framework-connectivity is only for framework-connectivity. |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 478 | java_library { |
| 479 | name: "net-utils-framework-connectivity", |
| 480 | srcs: [ |
| 481 | ":net-utils-framework-connectivity-srcs", |
| 482 | ], |
| 483 | sdk_version: "module_current", |
| 484 | min_sdk_version: "30", |
| 485 | apex_available: [ |
| 486 | "com.android.tethering", |
| 487 | "//apex_available:platform", |
| 488 | ], |
| 489 | visibility: [ |
| Handa Wang | 8be10bf | 2024-08-08 15:36:48 +0000 | [diff] [blame] | 490 | "//packages/modules/Connectivity/framework", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 491 | ], |
| 492 | libs: [ |
| 493 | "androidx.annotation_annotation", |
| 494 | "framework-annotations-lib", |
| Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 495 | "framework-configinfrastructure.stubs.module_lib", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 496 | "framework-connectivity.stubs.module_lib", |
| 497 | ], |
| Sarup Dalwani | 746540b | 2025-04-22 16:01:52 +0000 | [diff] [blame] | 498 | static_libs: [ |
| 499 | "net-utils-framework-common", |
| 500 | ], |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 501 | lint: { |
| 502 | strict_updatability_linting: true, |
| 503 | error_checks: ["NewApi"], |
| 504 | }, |
| 505 | } |
| 506 | |
| 507 | java_defaults { |
| 508 | name: "net-utils-non-bootclasspath-defaults", |
| 509 | sdk_version: "module_current", |
| 510 | min_sdk_version: "30", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 511 | libs: [ |
| 512 | "androidx.annotation_annotation", |
| 513 | "framework-annotations-lib", |
| Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 514 | "framework-configinfrastructure.stubs.module_lib", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 515 | "framework-connectivity.stubs.module_lib", |
| 516 | "framework-connectivity-t.stubs.module_lib", |
| 517 | "framework-location.stubs.module_lib", |
| Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 518 | "framework-tethering.stubs.module_lib", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 519 | "unsupportedappusage", |
| 520 | ], |
| 521 | static_libs: [ |
| 522 | "modules-utils-build_system", |
| 523 | "modules-utils-statemachine", |
| 524 | "net-utils-non-bootclasspath-aidl-java", |
| 525 | "netd-client", |
| 526 | ], |
| 527 | apex_available: [ |
| 528 | "com.android.tethering", |
| 529 | "//apex_available:platform", |
| 530 | ], |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 531 | defaults_visibility: [ |
| 532 | "//visibility:private", |
| 533 | ], |
| 534 | lint: { |
| 535 | strict_updatability_linting: true, |
| 536 | error_checks: ["NewApi"], |
| 537 | }, |
| 538 | } |
| 539 | |
| Handa Wang | 8be10bf | 2024-08-08 15:36:48 +0000 | [diff] [blame] | 540 | // net-utils-service-connectivity is only for service-connectivity. |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 541 | java_library { |
| 542 | name: "net-utils-service-connectivity", |
| 543 | srcs: [ |
| 544 | ":net-utils-all-srcs", |
| 545 | ], |
| 546 | exclude_srcs: [ |
| 547 | ":net-utils-framework-connectivity-srcs", |
| 548 | ], |
| 549 | libs: [ |
| 550 | "net-utils-framework-connectivity", |
| Jihoon Kang | 8401b6a | 2024-08-30 00:29:58 +0000 | [diff] [blame] | 551 | "framework-connectivity.impl", |
| 552 | "framework-tethering.impl", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 553 | ], |
| 554 | defaults: ["net-utils-non-bootclasspath-defaults"], |
| Nate Jiang | 5f0471c | 2024-07-12 16:49:52 +0000 | [diff] [blame] | 555 | jarjar_rules: "jarjar-rules-shared.txt", |
| Handa Wang | 8be10bf | 2024-08-08 15:36:48 +0000 | [diff] [blame] | 556 | visibility: [ |
| 557 | "//packages/modules/Connectivity/service", |
| 558 | "//packages/modules/Connectivity/staticlibs/tests/unit", |
| 559 | ], |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 560 | } |
| 561 | |
| Remi NGUYEN VAN | 514f40b | 2024-08-15 08:07:02 +0000 | [diff] [blame] | 562 | // net-utils-connectivity-apks is only for NetworkStack, CaptivePortalLogin and |
| 563 | // Tethering.apk |
| 564 | // It includes all the static libraries in this directory, which is safe because |
| 565 | // these APKs use R8 to strip out unused code, and they do not depend on |
| 566 | // bootclasspath jars that may have duplicate copies of the included classes |
| 567 | // with the same jarjaring. |
| 568 | // Tethering.apk does depend on a bootclasspath jar (framework-tethering.jar), |
| 569 | // however it does not use any of the static libraries. If it did, Tethering.apk |
| 570 | // would need to use another variant that excludes classes that are already |
| 571 | // included in framework-tethering.jar (similarly to how framework-connectivity |
| 572 | // and service-connectivity do it). Otherwise, static libs included in |
| 573 | // framework-tethering and Tethering.apk and jarjared the same way would |
| 574 | // conflict. |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 575 | java_library { |
| Xiao Ma | 6793fd0 | 2024-07-26 13:07:50 +0900 | [diff] [blame] | 576 | name: "net-utils-connectivity-apks", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 577 | srcs: [ |
| 578 | ":net-utils-all-srcs", |
| 579 | ":framework-connectivity-shared-srcs", |
| 580 | ], |
| 581 | defaults: ["net-utils-non-bootclasspath-defaults"], |
| Nate Jiang | 5f0471c | 2024-07-12 16:49:52 +0000 | [diff] [blame] | 582 | jarjar_rules: "jarjar-rules-shared.txt", |
| Handa Wang | 8be10bf | 2024-08-08 15:36:48 +0000 | [diff] [blame] | 583 | visibility: [ |
| 584 | "//packages/modules/CaptivePortalLogin:__subpackages__", |
| 585 | "//packages/modules/Connectivity/Tethering", |
| 586 | ], |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 587 | } |
| 588 | |
| 589 | aidl_interface { |
| 590 | name: "net-utils-non-bootclasspath-aidl", |
| 591 | srcs: [ |
| 592 | ":net-utils-aidl-srcs", |
| 593 | ], |
| 594 | unstable: true, |
| 595 | backend: { |
| 596 | java: { |
| 597 | enabled: true, |
| 598 | min_sdk_version: "30", |
| 599 | apex_available: [ |
| 600 | "com.android.tethering", |
| Nate Jiang | 5f0471c | 2024-07-12 16:49:52 +0000 | [diff] [blame] | 601 | "com.android.wifi", |
| Xiao Ma | b28199a | 2024-08-05 14:24:26 +0900 | [diff] [blame] | 602 | "//apex_available:platform", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 603 | ], |
| 604 | }, |
| 605 | cpp: { |
| 606 | enabled: false, |
| 607 | }, |
| 608 | ndk: { |
| 609 | enabled: false, |
| 610 | }, |
| 611 | rust: { |
| 612 | enabled: false, |
| 613 | }, |
| 614 | }, |
| 615 | include_dirs: [ |
| 616 | "packages/modules/Connectivity/framework/aidl-export", |
| 617 | ], |
| 618 | visibility: [ |
| 619 | "//system/tools/aidl/build", |
| 620 | ], |
| Lorenzo Colitti | 8f8e59a | 2025-08-06 15:21:50 +0900 | [diff] [blame] | 621 | imports: [ |
| Sarup Dalwani | 1bec0d6 | 2025-07-02 17:45:00 +0000 | [diff] [blame] | 622 | "netd_aidl_interface-V18", // For RouteInfoParcel. |
| Lorenzo Colitti | 8f8e59a | 2025-08-06 15:21:50 +0900 | [diff] [blame] | 623 | ], |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 624 | } |
| 625 | |
| Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 626 | // Use a filegroup and not a library for telephony sources, as framework-annotations cannot be |
| 627 | // included either (some annotations would be duplicated on the bootclasspath). |
| 628 | filegroup { |
| 629 | name: "net-utils-telephony-common-srcs", |
| 630 | srcs: [ |
| 631 | // Any class here *must* have a corresponding jarjar rule in the telephony build rules. |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 632 | "device/android/net/NetworkFactory.java", |
| Chalard Jean | 7592a34 | 2021-04-19 18:04:34 +0900 | [diff] [blame] | 633 | "device/android/net/NetworkFactoryImpl.java", |
| 634 | "device/android/net/NetworkFactoryLegacyImpl.java", |
| 635 | "device/android/net/NetworkFactoryShim.java", |
| Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 636 | ], |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 637 | path: "device", |
| Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 638 | visibility: [ |
| 639 | "//frameworks/opt/telephony", |
| 640 | ], |
| 641 | } |
| Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 642 | |
| Nate Jiang | 5f0471c | 2024-07-12 16:49:52 +0000 | [diff] [blame] | 643 | // Filegroup to build lib used by Wifi framework |
| Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 644 | // Any class here *must* have a corresponding jarjar rule in the wifi build rules. |
| 645 | filegroup { |
| 646 | name: "net-utils-framework-wifi-common-srcs", |
| 647 | srcs: [ |
| Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 648 | "framework/com/android/net/module/util/DnsSdTxtRecord.java", |
| 649 | "framework/com/android/net/module/util/Inet4AddressUtils.java", |
| 650 | "framework/com/android/net/module/util/InetAddressUtils.java", |
| 651 | "framework/com/android/net/module/util/MacAddressUtils.java", |
| 652 | "framework/com/android/net/module/util/NetUtils.java", |
| Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 653 | ], |
| Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 654 | path: "framework", |
| Nate Jiang | 5f0471c | 2024-07-12 16:49:52 +0000 | [diff] [blame] | 655 | visibility: ["//visibility:private"], |
| Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 656 | } |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 657 | |
| Yan Yan | 61f779c | 2024-10-01 15:07:51 -0700 | [diff] [blame] | 658 | // Filegroup to build lib used by IPsec/IKE framework |
| 659 | // Any class here *must* have a corresponding jarjar rule in the IPsec build rules. |
| 660 | filegroup { |
| 661 | name: "net-utils-framework-ipsec-common-srcs", |
| 662 | srcs: [ |
| 663 | "framework/com/android/net/module/util/HexDump.java", |
| 664 | ], |
| 665 | path: "framework", |
| 666 | visibility: ["//visibility:private"], |
| 667 | } |
| 668 | |
| 669 | java_library { |
| 670 | name: "net-utils-framework-ipsec", |
| 671 | sdk_version: "module_current", |
| 672 | min_sdk_version: "30", |
| 673 | srcs: [":net-utils-framework-ipsec-common-srcs"], |
| 674 | libs: [ |
| 675 | "androidx.annotation_annotation", |
| 676 | ], |
| 677 | visibility: [ |
| 678 | "//packages/modules/IPsec", |
| 679 | ], |
| 680 | apex_available: ["com.android.ipsec"], |
| 681 | } |
| 682 | |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 683 | // Use a file group containing classes necessary for framework-connectivity. The file group should |
| 684 | // be as small as possible because because the classes end up in the bootclasspath and R8 is not |
| 685 | // used to remove unused classes. |
| 686 | filegroup { |
| 687 | name: "net-utils-framework-connectivity-srcs", |
| 688 | srcs: [ |
| 689 | "device/com/android/net/module/util/BpfBitmap.java", |
| 690 | "device/com/android/net/module/util/BpfDump.java", |
| 691 | "device/com/android/net/module/util/BpfMap.java", |
| 692 | "device/com/android/net/module/util/BpfUtils.java", |
| 693 | "device/com/android/net/module/util/IBpfMap.java", |
| 694 | "device/com/android/net/module/util/JniUtil.java", |
| Patrick Rohr | 62d51d1 | 2025-07-28 12:44:32 -0700 | [diff] [blame] | 695 | "device/com/android/net/module/util/LegacyStruct.java", |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 696 | "device/com/android/net/module/util/SingleWriterBpfMap.java", |
| 697 | "device/com/android/net/module/util/Struct.java", |
| 698 | "device/com/android/net/module/util/TcUtils.java", |
| 699 | "framework/com/android/net/module/util/HexDump.java", |
| 700 | ], |
| 701 | visibility: ["//visibility:private"], |
| 702 | } |
| 703 | |
| Handa Wang | e12dfea | 2024-11-01 09:25:28 +0000 | [diff] [blame] | 704 | // Sources outside of com.android.net.module.util should not be added because many modules depend on |
| 705 | // them and need jarjar rules |
| Handa Wang | 9b0df36 | 2024-07-02 13:17:43 +0000 | [diff] [blame] | 706 | filegroup { |
| 707 | name: "net-utils-all-srcs", |
| 708 | srcs: [ |
| 709 | "device/**/*.java", |
| 710 | ":net-utils-framework-common-srcs", |
| 711 | ], |
| 712 | visibility: ["//visibility:private"], |
| 713 | } |
| 714 | |
| 715 | filegroup { |
| 716 | name: "net-utils-aidl-srcs", |
| 717 | srcs: [ |
| 718 | "device/**/*.aidl", |
| 719 | ], |
| 720 | path: "device", |
| 721 | visibility: ["//visibility:private"], |
| 722 | } |
| Nate Jiang | 5f0471c | 2024-07-12 16:49:52 +0000 | [diff] [blame] | 723 | |
| 724 | java_library { |
| 725 | name: "net-utils-service-wifi", |
| 726 | srcs: [ |
| 727 | ":net-utils-all-srcs", |
| 728 | ], |
| 729 | exclude_srcs: [":net-utils-framework-wifi-common-srcs"], |
| 730 | libs: [ |
| 731 | "net-utils-framework-wifi", |
| 732 | ], |
| 733 | defaults: ["net-utils-non-bootclasspath-defaults"], |
| 734 | |
| 735 | visibility: [ |
| 736 | "//packages/modules/Wifi/service", |
| 737 | ], |
| 738 | apex_available: [ |
| 739 | "com.android.wifi", |
| 740 | ], |
| 741 | } |
| 742 | |
| 743 | java_library { |
| 744 | name: "net-utils-framework-wifi", |
| 745 | sdk_version: "module_current", |
| 746 | min_sdk_version: "30", |
| 747 | srcs: [":net-utils-framework-wifi-common-srcs"], |
| 748 | libs: [ |
| 749 | "framework-annotations-lib", |
| 750 | "framework-connectivity.stubs.module_lib", |
| 751 | "unsupportedappusage", |
| 752 | ], |
| 753 | visibility: [ |
| 754 | "//packages/modules/Wifi/framework", |
| 755 | ], |
| 756 | apex_available: ["com.android.wifi"], |
| 757 | } |
| Yuyang Huang | 1cc7769 | 2024-11-08 11:51:07 +0900 | [diff] [blame] | 758 | |
| 759 | genrule { |
| 760 | name: "statslog-framework-connectivity-java-gen", |
| 761 | tools: ["stats-log-api-gen"], |
| 762 | cmd: "$(location stats-log-api-gen) --java $(out) --module connectivity --javaPackage com.android.net.module.util --javaClass FrameworkConnectivityStatsLog", |
| 763 | out: ["com/android/net/module/util/FrameworkConnectivityStatsLog.java"], |
| 764 | } |
| Yan Yan | 587f996 | 2024-10-02 22:38:10 +0000 | [diff] [blame] | 765 | |
| 766 | java_library { |
| 767 | name: "net-utils-service-vcn", |
| 768 | sdk_version: "module_current", |
| 769 | min_sdk_version: "30", |
| 770 | srcs: [ |
| 771 | "device/com/android/net/module/util/HandlerUtils.java", |
| 772 | ], |
| 773 | libs: [ |
| 774 | "framework-annotations-lib", |
| 775 | ], |
| 776 | visibility: [ |
| 777 | // TODO: b/374174952 Remove it when VCN modularization is released |
| 778 | "//frameworks/base/packages/Vcn/service-b", |
| Yan Yan | 7c75e44 | 2025-07-09 01:17:17 +0000 | [diff] [blame] | 779 | "//packages/modules/Connectivity/Vcn/service-b", |
| Yan Yan | 587f996 | 2024-10-02 22:38:10 +0000 | [diff] [blame] | 780 | |
| 781 | "//packages/modules/Connectivity/service-b", |
| 782 | ], |
| 783 | apex_available: [ |
| 784 | // TODO: b/374174952 Remove it when VCN modularization is released |
| 785 | "//apex_available:platform", |
| 786 | |
| 787 | "com.android.tethering", |
| 788 | ], |
| 789 | } |
| Yan Yan | aa2f531 | 2025-07-09 01:19:40 +0000 | [diff] [blame] | 790 | |
| 791 | java_library { |
| 792 | name: "net-utils-framework-vcn", |
| 793 | sdk_version: "module_current", |
| 794 | min_sdk_version: "30", |
| 795 | srcs: [ |
| 796 | "framework/com/android/net/module/util/HexDump.java", |
| 797 | ], |
| 798 | libs: [ |
| 799 | "androidx.annotation_annotation", |
| 800 | ], |
| 801 | visibility: [ |
| 802 | // TODO: b/374174952 Clean up the paths when the VCN |
| 803 | // code location is finalized |
| 804 | "//frameworks/base/packages/Vcn/framework-b", |
| 805 | "//packages/modules/Connectivity/Vcn/framework-b", |
| 806 | "//packages/modules/Connectivity/framework-b", |
| 807 | ], |
| 808 | } |