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