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