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 | |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 35 | java_library { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 36 | name: "net-utils-device-common", |
| 37 | srcs: [ |
| 38 | "device/com/android/net/module/util/arp/ArpPacket.java", |
| 39 | "device/com/android/net/module/util/DeviceConfigUtils.java", |
| 40 | "device/com/android/net/module/util/DomainUtils.java", |
| 41 | "device/com/android/net/module/util/FdEventsReader.java", |
| 42 | "device/com/android/net/module/util/NetworkMonitorUtils.java", |
| 43 | "device/com/android/net/module/util/PacketReader.java", |
| 44 | "device/com/android/net/module/util/SharedLog.java", |
| 45 | "device/com/android/net/module/util/SocketUtils.java", |
| 46 | "device/com/android/net/module/util/FeatureVersions.java", |
| 47 | "device/com/android/net/module/util/HandlerUtils.java", |
| 48 | // This library is used by system modules, for which the system health impact of Kotlin |
| 49 | // has not yet been evaluated. Annotations may need jarjar'ing. |
| 50 | // "src_devicecommon/**/*.kt", |
| 51 | ], |
| 52 | sdk_version: "module_current", |
| 53 | min_sdk_version: "30", |
| 54 | target_sdk_version: "30", |
| 55 | apex_available: [ |
| 56 | "//apex_available:anyapex", |
| 57 | "//apex_available:platform", |
| 58 | ], |
| 59 | visibility: [ |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 60 | "//frameworks/base/packages/Tethering", |
Baligh Uddin | f8c1282 | 2021-05-21 04:26:52 +0000 | [diff] [blame] | 61 | "//packages/modules/Connectivity:__subpackages__", |
| 62 | "//packages/modules/Connectivity/framework:__subpackages__", |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 63 | "//frameworks/opt/net/ike", |
| 64 | "//frameworks/opt/net/wifi/service", |
Baligh Uddin | fcbda3a | 2020-12-24 06:12:25 +0000 | [diff] [blame] | 65 | "//packages/modules/Wifi/service", |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 66 | "//frameworks/opt/net/telephony", |
Xiao Ma | 6f95cef | 2020-09-08 19:16:15 +0900 | [diff] [blame] | 67 | "//packages/modules/NetworkStack:__subpackages__", |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 68 | "//packages/modules/CaptivePortalLogin", |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 69 | ], |
| 70 | static_libs: [ |
| 71 | "net-utils-framework-common", |
| 72 | ], |
| 73 | libs: [ |
| 74 | "androidx.annotation_annotation", |
| 75 | "framework-annotations-lib", |
| 76 | "framework-configinfrastructure", |
| 77 | "framework-connectivity.stubs.module_lib", |
| 78 | ], |
| 79 | lint: { |
| 80 | strict_updatability_linting: true, |
| 81 | error_checks: ["NewApi"], |
| 82 | }, |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 83 | } |
| 84 | |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 85 | java_defaults { |
| 86 | name: "lib_mockito_extended", |
| 87 | static_libs: [ |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 88 | "mockito-target-extended-minus-junit4", |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 89 | ], |
| 90 | jni_libs: [ |
| 91 | "libdexmakerjvmtiagent", |
| 92 | "libstaticjvmtiagent", |
| 93 | ], |
| 94 | } |
| 95 | |
Aswin Sankar | 601d6f9 | 2021-10-11 13:12:16 -0700 | [diff] [blame] | 96 | java_library { |
| 97 | name: "net-utils-dnspacket-common", |
| 98 | srcs: [ |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 99 | "framework/**/DnsPacket.java", |
| 100 | "framework/**/DnsPacketUtils.java", |
| 101 | "framework/**/DnsSvcbPacket.java", |
| 102 | "framework/**/DnsSvcbRecord.java", |
| 103 | "framework/**/HexDump.java", |
| 104 | "framework/**/NetworkStackConstants.java", |
Aswin Sankar | 601d6f9 | 2021-10-11 13:12:16 -0700 | [diff] [blame] | 105 | ], |
| 106 | sdk_version: "module_current", |
| 107 | visibility: [ |
| 108 | "//packages/services/Iwlan:__subpackages__", |
| 109 | ], |
Junyu Lai | 85e24e8 | 2022-09-15 07:34:51 +0000 | [diff] [blame] | 110 | libs: [ |
Mike Yu | 9b96c83 | 2023-09-18 08:26:08 +0000 | [diff] [blame] | 111 | "androidx.annotation_annotation", |
Junyu Lai | 85e24e8 | 2022-09-15 07:34:51 +0000 | [diff] [blame] | 112 | "framework-annotations-lib", |
| 113 | "framework-connectivity.stubs.module_lib", |
| 114 | ], |
Aswin Sankar | 601d6f9 | 2021-10-11 13:12:16 -0700 | [diff] [blame] | 115 | } |
| 116 | |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 117 | filegroup { |
| 118 | name: "net-utils-framework-common-srcs", |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 119 | srcs: ["framework/**/*.java"], |
| 120 | path: "framework", |
Remi NGUYEN VAN | 651faf7 | 2021-03-24 22:40:37 +0900 | [diff] [blame] | 121 | visibility: [ |
| 122 | "//frameworks/base", |
Baligh Uddin | 27e5fcd | 2021-05-22 13:16:30 +0000 | [diff] [blame] | 123 | "//packages/modules/Connectivity:__subpackages__", |
Remi NGUYEN VAN | 651faf7 | 2021-03-24 22:40:37 +0900 | [diff] [blame] | 124 | ], |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 125 | } |
| 126 | |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 127 | // The net-utils-device-common-bpf library requires the callers to contain |
| 128 | // net-utils-device-common-struct-base. |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 129 | java_library { |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 130 | name: "net-utils-device-common-bpf", |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 131 | srcs: [ |
Tyler Wear | 92f3c24 | 2022-02-15 15:21:43 -0800 | [diff] [blame] | 132 | "device/com/android/net/module/util/BpfBitmap.java", |
Hungming Chen | b3e71a2 | 2022-06-23 21:34:54 +0800 | [diff] [blame] | 133 | "device/com/android/net/module/util/BpfDump.java", |
Tyler Wear | aafd9c1 | 2021-10-19 11:01:46 -0700 | [diff] [blame] | 134 | "device/com/android/net/module/util/BpfMap.java", |
Tyler Wear | e48ee4a | 2022-02-15 15:30:50 -0800 | [diff] [blame] | 135 | "device/com/android/net/module/util/BpfUtils.java", |
markchien | 2e5fece | 2022-01-21 10:16:54 +0800 | [diff] [blame] | 136 | "device/com/android/net/module/util/IBpfMap.java", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 137 | "device/com/android/net/module/util/JniUtil.java", |
Lorenzo Colitti | 05be2f5 | 2024-06-02 13:24:21 +0900 | [diff] [blame] | 138 | "device/com/android/net/module/util/SingleWriterBpfMap.java", |
Patrick Rohr | 29b0d95 | 2022-01-12 21:42:24 +0100 | [diff] [blame] | 139 | "device/com/android/net/module/util/TcUtils.java", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 140 | ], |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 141 | sdk_version: "module_current", |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 142 | min_sdk_version: "30", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 143 | visibility: [ |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 144 | "//packages/modules/Connectivity:__subpackages__", |
| 145 | "//packages/modules/NetworkStack:__subpackages__", |
| 146 | ], |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 147 | libs: [ |
| 148 | "androidx.annotation_annotation", |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 149 | "framework-connectivity.stubs.module_lib", |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 150 | "net-utils-device-common-struct-base", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 151 | ], |
| 152 | apex_available: [ |
| 153 | "com.android.tethering", |
| 154 | "//apex_available:platform", |
| 155 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 156 | lint: { |
| 157 | strict_updatability_linting: true, |
| 158 | error_checks: ["NewApi"], |
| 159 | }, |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | java_library { |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 163 | name: "net-utils-device-common-struct-base", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 164 | srcs: [ |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 165 | "device/com/android/net/module/util/Struct.java", |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 166 | ], |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 167 | sdk_version: "module_current", |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 168 | min_sdk_version: "30", |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 169 | visibility: [ |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 170 | "//packages/modules/Connectivity:__subpackages__", |
| 171 | "//packages/modules/NetworkStack:__subpackages__", |
| 172 | ], |
| 173 | static_libs: [ |
| 174 | "net-utils-framework-common", |
| 175 | ], |
| 176 | libs: [ |
| 177 | "androidx.annotation_annotation", |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 178 | "framework-annotations-lib", // Required by InetAddressUtils.java |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 179 | "framework-connectivity.stubs.module_lib", |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 180 | ], |
| 181 | apex_available: [ |
| 182 | "com.android.tethering", |
| 183 | "//apex_available:platform", |
| 184 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 185 | lint: { |
| 186 | strict_updatability_linting: true, |
| 187 | error_checks: ["NewApi"], |
| 188 | }, |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 189 | } |
| 190 | |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 191 | // The net-utils-device-common-struct library requires the callers to contain |
| 192 | // net-utils-device-common-struct-base. |
Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 193 | java_library { |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 194 | name: "net-utils-device-common-struct", |
Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 195 | srcs: [ |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 196 | "device/com/android/net/module/util/Ipv6Utils.java", |
| 197 | "device/com/android/net/module/util/PacketBuilder.java", |
| 198 | "device/com/android/net/module/util/structs/*.java", |
Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 199 | ], |
| 200 | sdk_version: "module_current", |
| 201 | min_sdk_version: "30", |
| 202 | visibility: [ |
| 203 | "//packages/modules/Connectivity:__subpackages__", |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 204 | "//packages/modules/NetworkStack:__subpackages__", |
Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 205 | ], |
| 206 | libs: [ |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 207 | "androidx.annotation_annotation", |
| 208 | "framework-annotations-lib", // Required by IpUtils.java |
| 209 | "framework-connectivity.stubs.module_lib", |
| 210 | "net-utils-device-common-struct-base", |
Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 211 | ], |
| 212 | apex_available: [ |
| 213 | "com.android.tethering", |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 214 | "//apex_available:platform", |
Yang Sun | 1c9fb59 | 2024-02-19 10:37:26 +0800 | [diff] [blame] | 215 | ], |
| 216 | lint: { |
| 217 | strict_updatability_linting: true, |
| 218 | error_checks: ["NewApi"], |
| 219 | }, |
| 220 | } |
| 221 | |
Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 222 | // The net-utils-device-common-netlink library requires the callers to contain |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 223 | // net-utils-device-common-struct and net-utils-device-common-struct-base. |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 224 | java_library { |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 225 | name: "net-utils-device-common-netlink", |
| 226 | srcs: [ |
Yan Yan | f085fad | 2023-11-20 18:51:30 +0000 | [diff] [blame] | 227 | "device/com/android/net/module/util/netlink/**/*.java", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 228 | ], |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 229 | sdk_version: "module_current", |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 230 | min_sdk_version: "30", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 231 | visibility: [ |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 232 | "//packages/modules/Connectivity:__subpackages__", |
| 233 | "//packages/modules/NetworkStack:__subpackages__", |
| 234 | ], |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 235 | libs: [ |
| 236 | "androidx.annotation_annotation", |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 237 | "framework-connectivity.stubs.module_lib", |
Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 238 | // For libraries which are statically linked in framework-connectivity, do not |
| 239 | // statically link here because callers of this library might already have a static |
| 240 | // version linked. |
| 241 | "net-utils-device-common-struct", |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 242 | "net-utils-device-common-struct-base", |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 243 | ], |
| 244 | apex_available: [ |
| 245 | "com.android.tethering", |
| 246 | "//apex_available:platform", |
| 247 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 248 | lint: { |
| 249 | strict_updatability_linting: true, |
| 250 | error_checks: ["NewApi"], |
| 251 | }, |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 252 | } |
| 253 | |
Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 254 | // The net-utils-device-common-ip library requires the callers to contain |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 255 | // net-utils-device-common-struct and net-utils-device-common-struct-base. |
markchien | f3448f9 | 2021-11-10 01:06:51 +0800 | [diff] [blame] | 256 | java_library { |
Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 257 | // TODO : this target should probably be folded into net-utils-device-common |
| 258 | name: "net-utils-device-common-ip", |
| 259 | srcs: [ |
| 260 | "device/com/android/net/module/util/ip/*.java", |
| 261 | ], |
| 262 | sdk_version: "module_current", |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 263 | min_sdk_version: "30", |
Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 264 | visibility: [ |
Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 265 | "//packages/modules/Connectivity:__subpackages__", |
| 266 | "//packages/modules/NetworkStack:__subpackages__", |
| 267 | ], |
| 268 | libs: [ |
| 269 | "framework-annotations-lib", |
| 270 | "framework-connectivity", |
| 271 | ], |
| 272 | static_libs: [ |
| 273 | "net-utils-device-common", |
| 274 | "net-utils-device-common-netlink", |
| 275 | "net-utils-framework-common", |
| 276 | "netd-client", |
| 277 | ], |
| 278 | apex_available: [ |
| 279 | "com.android.tethering", |
| 280 | "//apex_available:platform", |
| 281 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 282 | lint: { |
Cole Faust | 53da9ac | 2024-02-01 16:57:31 -0800 | [diff] [blame] | 283 | baseline_filename: "lint-baseline.xml", |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 284 | error_checks: ["NewApi"], |
| 285 | }, |
Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | java_library { |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 289 | name: "net-utils-framework-common", |
Remi NGUYEN VAN | ce241a3 | 2020-01-14 21:42:09 +0900 | [diff] [blame] | 290 | srcs: [ |
| 291 | ":net-utils-framework-common-srcs", |
Remi NGUYEN VAN | ce241a3 | 2020-01-14 21:42:09 +0900 | [diff] [blame] | 292 | ], |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 293 | sdk_version: "module_current", |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 294 | min_sdk_version: "30", |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 295 | libs: [ |
Jooyung Han | b3b6798 | 2022-06-24 14:56:24 +0900 | [diff] [blame] | 296 | "androidx.annotation_annotation", |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 297 | "framework-annotations-lib", |
| 298 | "framework-connectivity.stubs.module_lib", |
paulhu | cdb069e | 2022-02-14 15:28:50 +0800 | [diff] [blame] | 299 | "framework-connectivity-t.stubs.module_lib", |
Mark White | 66d39cd | 2023-08-07 15:20:07 +0000 | [diff] [blame] | 300 | "framework-location.stubs.module_lib", |
Remi NGUYEN VAN | 7f0d0e3 | 2022-01-25 19:08:12 +0900 | [diff] [blame] | 301 | ], |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 302 | jarjar_rules: "jarjar-rules-shared.txt", |
| 303 | visibility: [ |
Luke Huang | fd5479e | 2020-06-20 11:38:17 +0800 | [diff] [blame] | 304 | "//cts/tests/tests/net", |
Chalard Jean | ceaf7d0 | 2020-06-26 18:34:52 +0900 | [diff] [blame] | 305 | "//cts/tests/tests/wifi", |
Baligh Uddin | e685c81 | 2020-10-31 04:28:58 +0000 | [diff] [blame] | 306 | "//packages/modules/Connectivity/tests/cts/net", |
Baligh Uddin | ae4770d | 2020-10-29 02:12:06 +0000 | [diff] [blame] | 307 | "//packages/modules/Connectivity/Tethering", |
Chalard Jean | a9f4991 | 2020-10-15 18:06:30 +0900 | [diff] [blame] | 308 | "//frameworks/base/tests:__subpackages__", |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 309 | "//frameworks/opt/net/ike", |
| 310 | "//frameworks/opt/telephony", |
Chalard Jean | 1978919 | 2020-10-01 12:45:31 +0900 | [diff] [blame] | 311 | "//frameworks/base/wifi:__subpackages__", |
Remi NGUYEN VAN | 38afb0c | 2020-11-10 18:04:27 +0900 | [diff] [blame] | 312 | "//packages/modules/Connectivity:__subpackages__", |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 313 | "//packages/modules/NetworkStack:__subpackages__", |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 314 | "//packages/modules/CaptivePortalLogin", |
Baligh Uddin | fcbda3a | 2020-12-24 06:12:25 +0000 | [diff] [blame] | 315 | "//packages/modules/Wifi/framework/tests:__subpackages__", |
Junyu Lai | b24df14 | 2022-01-10 10:31:11 +0000 | [diff] [blame] | 316 | "//packages/apps/Settings", |
Chalard Jean | 7592a34 | 2021-04-19 18:04:34 +0900 | [diff] [blame] | 317 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 318 | lint: { |
| 319 | strict_updatability_linting: true, |
| 320 | error_checks: ["NewApi"], |
| 321 | }, |
Paul Hu | 8d47d84 | 2023-03-31 14:59:49 +0800 | [diff] [blame] | 322 | errorprone: { |
| 323 | enabled: true, |
| 324 | // Error-prone checking only warns of problems when building. To make the build fail with |
| 325 | // these errors, list the specific error-prone problems below. |
| 326 | javacflags: [ |
| 327 | "-Xep:NullablePrimitive:ERROR", |
| 328 | ], |
| 329 | }, |
Spandan Das | 2b83e77 | 2023-12-21 20:46:31 +0000 | [diff] [blame] | 330 | apex_available: [ |
| 331 | "//apex_available:platform", |
| 332 | "com.android.tethering", |
| 333 | ], |
Aaron Huang | f73ff8c | 2019-12-06 18:12:24 +0800 | [diff] [blame] | 334 | } |
Anton Hansson | 0ceeb7c | 2022-05-30 12:01:49 +0000 | [diff] [blame] | 335 | |
| 336 | java_library { |
| 337 | name: "net-utils-services-common", |
David Su | 2dbab64 | 2020-10-26 14:51:01 -0700 | [diff] [blame] | 338 | srcs: [ |
| 339 | "device/android/net/NetworkFactory.java", |
Chalard Jean | 7592a34 | 2021-04-19 18:04:34 +0900 | [diff] [blame] | 340 | "device/android/net/NetworkFactoryImpl.java", |
| 341 | "device/android/net/NetworkFactoryLegacyImpl.java", |
| 342 | "device/android/net/NetworkFactoryShim.java", |
David Su | 2dbab64 | 2020-10-26 14:51:01 -0700 | [diff] [blame] | 343 | ], |
Chalard Jean | d580242 | 2021-10-27 19:02:14 +0900 | [diff] [blame] | 344 | sdk_version: "module_current", |
David Su | dc0a568 | 2021-01-29 04:42:27 +0000 | [diff] [blame] | 345 | min_sdk_version: "30", |
Chalard Jean | 7592a34 | 2021-04-19 18:04:34 +0900 | [diff] [blame] | 346 | static_libs: [ |
| 347 | "modules-utils-build_system", |
| 348 | ], |
Chalard Jean | d580242 | 2021-10-27 19:02:14 +0900 | [diff] [blame] | 349 | libs: [ |
| 350 | "framework-annotations-lib", |
| 351 | "framework-connectivity", |
| 352 | ], |
Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 353 | // TODO: remove "apex_available:platform". |
| 354 | apex_available: [ |
| 355 | "//apex_available:platform", |
William Escande | fbe576b | 2022-08-22 11:28:00 -0700 | [diff] [blame] | 356 | "com.android.btservices", |
Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 357 | "com.android.tethering", |
Anton Hansson | 0ceeb7c | 2022-05-30 12:01:49 +0000 | [diff] [blame] | 358 | "com.android.wifi", |
Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 359 | ], |
Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 360 | visibility: [ |
markchien | 32a6e9c | 2022-01-20 14:34:15 +0800 | [diff] [blame] | 361 | // TODO: remove after NetworkStatsService moves to the module. |
Remi NGUYEN VAN | 376f8d4 | 2020-01-15 18:26:29 +0900 | [diff] [blame] | 362 | "//frameworks/base/services/net", |
Xiao Ma | 2bbc2f7 | 2022-01-24 07:58:12 +0000 | [diff] [blame] | 363 | "//packages/modules/Connectivity/service", |
Remi NGUYEN VAN | 0cf724a | 2021-11-19 18:33:12 +0900 | [diff] [blame] | 364 | "//packages/modules/Connectivity/tests:__subpackages__", |
Roopa Sattiraju | 98fa3bf | 2022-02-03 18:53:23 -0800 | [diff] [blame] | 365 | "//packages/modules/Bluetooth/android/app", |
Nate(Qiang) Jiang | ce723aa | 2022-06-01 21:28:32 +0000 | [diff] [blame] | 366 | "//packages/modules/Wifi/service:__subpackages__", |
Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 367 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 368 | lint: { |
| 369 | strict_updatability_linting: true, |
| 370 | error_checks: ["NewApi"], |
| 371 | }, |
Aaron Huang | 57a9496 | 2020-01-03 20:35:55 +0800 | [diff] [blame] | 372 | } |
Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 373 | |
Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 374 | java_library { |
| 375 | name: "net-utils-device-common-async", |
| 376 | srcs: [ |
| 377 | "device/com/android/net/module/util/async/*.java", |
| 378 | ], |
| 379 | sdk_version: "module_current", |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 380 | min_sdk_version: "30", |
Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 381 | visibility: [ |
Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 382 | "//packages/modules/Connectivity:__subpackages__", |
| 383 | ], |
| 384 | libs: [ |
| 385 | "framework-annotations-lib", |
| 386 | ], |
| 387 | static_libs: [ |
| 388 | ], |
| 389 | apex_available: [ |
| 390 | "com.android.tethering", |
| 391 | "//apex_available:platform", |
| 392 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 393 | lint: { |
| 394 | strict_updatability_linting: true, |
| 395 | error_checks: ["NewApi"], |
| 396 | }, |
Igor Chernyshev | a25f109 | 2022-12-20 00:07:38 -0800 | [diff] [blame] | 397 | } |
| 398 | |
Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 399 | java_library { |
| 400 | name: "net-utils-device-common-wear", |
| 401 | srcs: [ |
| 402 | "device/com/android/net/module/util/wear/*.java", |
| 403 | ], |
| 404 | sdk_version: "module_current", |
Maciej Żenczykowski | 127a144 | 2023-09-19 23:17:10 +0000 | [diff] [blame] | 405 | min_sdk_version: "30", |
Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 406 | visibility: [ |
Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 407 | "//packages/modules/Connectivity:__subpackages__", |
| 408 | ], |
| 409 | libs: [ |
| 410 | "framework-annotations-lib", |
| 411 | ], |
| 412 | static_libs: [ |
| 413 | "net-utils-device-common-async", |
| 414 | ], |
| 415 | apex_available: [ |
| 416 | "com.android.tethering", |
| 417 | "//apex_available:platform", |
| 418 | ], |
Motomu Utsumi | 195a30f | 2023-09-27 16:03:30 +0900 | [diff] [blame] | 419 | lint: { |
| 420 | strict_updatability_linting: true, |
| 421 | error_checks: ["NewApi"], |
| 422 | }, |
Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 423 | } |
| 424 | |
Yuyang Huang | f67388b | 2023-03-29 16:51:09 +0900 | [diff] [blame] | 425 | // Limited set of utilities for use by service-connectivity-mdns-standalone-build-test, to make sure |
| 426 | // the mDNS code can build with only system APIs. |
| 427 | // The mDNS code is platform code so it should use framework-annotations-lib, contrary to apps that |
| 428 | // should use sdk_version: "system_current" and only androidx.annotation_annotation. But this build |
| 429 | // rule verifies that the mDNS code can be built into apps, if code transformations are applied to |
| 430 | // the annotations. |
| 431 | // When using "system_current", framework annotations are not available; they would appear as |
| 432 | // package-private as they are marked as such in the system_current stubs. So build against |
| 433 | // core_platform and add the stubs manually in "libs". See http://b/147773144#comment7. |
| 434 | java_library { |
| 435 | name: "net-utils-device-common-mdns-standalone-build-test", |
| 436 | // Build against core_platform and add the stub libraries manually in "libs", as annotations |
| 437 | // are already included in android_system_stubs_current but package-private, so |
| 438 | // "framework-annotations-lib" needs to be manually included before |
| 439 | // "android_system_stubs_current" (b/272392042) |
| 440 | sdk_version: "core_platform", |
| 441 | srcs: [ |
| 442 | "device/com/android/net/module/util/FdEventsReader.java", |
Yuyang Huang | f67388b | 2023-03-29 16:51:09 +0900 | [diff] [blame] | 443 | "device/com/android/net/module/util/SharedLog.java", |
| 444 | "framework/com/android/net/module/util/ByteUtils.java", |
| 445 | "framework/com/android/net/module/util/CollectionUtils.java", |
Yuyang Huang | e4eb87a | 2023-05-02 18:44:51 +0900 | [diff] [blame] | 446 | "framework/com/android/net/module/util/HexDump.java", |
Yuyang Huang | f67388b | 2023-03-29 16:51:09 +0900 | [diff] [blame] | 447 | "framework/com/android/net/module/util/LinkPropertiesUtils.java", |
| 448 | ], |
| 449 | libs: [ |
| 450 | "framework-annotations-lib", |
| 451 | "android_system_stubs_current", |
| 452 | "androidx.annotation_annotation", |
| 453 | ], |
| 454 | visibility: ["//packages/modules/Connectivity/service-t"], |
| 455 | } |
| 456 | |
Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 457 | // Use a filegroup and not a library for telephony sources, as framework-annotations cannot be |
| 458 | // included either (some annotations would be duplicated on the bootclasspath). |
| 459 | filegroup { |
| 460 | name: "net-utils-telephony-common-srcs", |
| 461 | srcs: [ |
| 462 | // 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] | 463 | "device/android/net/NetworkFactory.java", |
Chalard Jean | 7592a34 | 2021-04-19 18:04:34 +0900 | [diff] [blame] | 464 | "device/android/net/NetworkFactoryImpl.java", |
| 465 | "device/android/net/NetworkFactoryLegacyImpl.java", |
| 466 | "device/android/net/NetworkFactoryShim.java", |
Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 467 | ], |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 468 | path: "device", |
Lorenzo Colitti | e14bd34 | 2020-01-14 14:47:16 +0900 | [diff] [blame] | 469 | visibility: [ |
| 470 | "//frameworks/opt/telephony", |
| 471 | ], |
| 472 | } |
Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 473 | |
| 474 | // Use a filegroup and not a library for wifi sources, as this needs corresponding jar-jar |
| 475 | // rules on the wifi side. |
| 476 | // Any class here *must* have a corresponding jarjar rule in the wifi build rules. |
| 477 | filegroup { |
| 478 | name: "net-utils-framework-wifi-common-srcs", |
| 479 | srcs: [ |
Chalard Jean | b61091b | 2021-10-07 15:29:13 +0900 | [diff] [blame] | 480 | "framework/com/android/net/module/util/DnsSdTxtRecord.java", |
| 481 | "framework/com/android/net/module/util/Inet4AddressUtils.java", |
| 482 | "framework/com/android/net/module/util/InetAddressUtils.java", |
| 483 | "framework/com/android/net/module/util/MacAddressUtils.java", |
| 484 | "framework/com/android/net/module/util/NetUtils.java", |
Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 485 | ], |
Chalard Jean | 48c6c7d | 2020-06-25 23:39:15 +0900 | [diff] [blame] | 486 | path: "framework", |
Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 487 | visibility: [ |
| 488 | "//frameworks/base", |
| 489 | ], |
| 490 | } |
| 491 | |
| 492 | // Use a filegroup and not a library for wifi sources, as this needs corresponding jar-jar |
| 493 | // rules on the wifi side. |
| 494 | // Any class here *must* have a corresponding jarjar rule in the wifi build rules. |
| 495 | filegroup { |
| 496 | name: "net-utils-wifi-service-common-srcs", |
| 497 | srcs: [ |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 498 | "device/android/net/NetworkFactory.java", |
| 499 | "device/android/net/NetworkFactoryImpl.java", |
| 500 | "device/android/net/NetworkFactoryLegacyImpl.java", |
| 501 | "device/android/net/NetworkFactoryShim.java", |
Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 502 | ], |
| 503 | visibility: [ |
| 504 | "//frameworks/opt/net/wifi/service", |
Baligh Uddin | fcbda3a | 2020-12-24 06:12:25 +0000 | [diff] [blame] | 505 | "//packages/modules/Wifi/service", |
Roshan Pius | 864bdec | 2020-01-16 09:19:11 -0800 | [diff] [blame] | 506 | ], |
| 507 | } |