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