Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2020 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
Bob Badour | 6c7ed9d | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 17 | package { |
| 18 | // See: http://go/android-license-faq |
Baligh Uddin | 3684713 | 2021-05-23 16:38:40 +0000 | [diff] [blame] | 19 | default_applicable_licenses: ["Android-Apache-2.0"], |
Bob Badour | 6c7ed9d | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 20 | } |
| 21 | |
Tyler Wear | b37f551 | 2021-10-01 13:22:00 -0700 | [diff] [blame] | 22 | aidl_interface { |
| 23 | name: "connectivity_native_aidl_interface", |
| 24 | local_include_dir: "binder", |
| 25 | vendor_available: true, |
| 26 | srcs: [ |
| 27 | "binder/android/net/connectivity/aidl/*.aidl", |
| 28 | ], |
| 29 | backend: { |
| 30 | java: { |
| 31 | apex_available: [ |
| 32 | "com.android.tethering", |
| 33 | ], |
| 34 | min_sdk_version: "30", |
| 35 | }, |
| 36 | ndk: { |
| 37 | apex_available: [ |
| 38 | "com.android.tethering", |
| 39 | ], |
| 40 | min_sdk_version: "30", |
| 41 | }, |
| 42 | }, |
| 43 | versions: ["1"], |
| 44 | |
| 45 | } |
| 46 | |
| 47 | cc_library_static { |
| 48 | name: "connectivity_native_aidl_interface-lateststable-ndk", |
| 49 | min_sdk_version: "30", |
| 50 | whole_static_libs: [ |
| 51 | "connectivity_native_aidl_interface-V1-ndk", |
| 52 | ], |
| 53 | apex_available: [ |
| 54 | "com.android.tethering", |
| 55 | ], |
| 56 | } |
| 57 | |
| 58 | java_library { |
| 59 | name: "connectivity_native_aidl_interface-lateststable-java", |
| 60 | sdk_version: "system_current", |
| 61 | min_sdk_version: "30", |
| 62 | static_libs: [ |
| 63 | "connectivity_native_aidl_interface-V1-java", |
| 64 | ], |
| 65 | apex_available: [ |
| 66 | "com.android.tethering", |
| 67 | ], |
| 68 | } |
| 69 | |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 70 | // The library name match the service-connectivity jarjar rules that put the JNI utils in the |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 71 | // android.net.connectivity.com.android.net.module.util package. |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 72 | cc_library_shared { |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 73 | name: "libandroid_net_connectivity_com_android_net_module_util_jni", |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 74 | min_sdk_version: "30", |
| 75 | cflags: [ |
| 76 | "-Wall", |
| 77 | "-Werror", |
| 78 | "-Wno-unused-parameter", |
| 79 | "-Wthread-safety", |
| 80 | ], |
| 81 | srcs: [ |
| 82 | "jni/com_android_net_module_util/onload.cpp", |
| 83 | ], |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 84 | static_libs: [ |
| 85 | "libnet_utils_device_common_bpfjni", |
Tyler Wear | b37f551 | 2021-10-01 13:22:00 -0700 | [diff] [blame] | 86 | "libnet_utils_device_common_bpfutils", |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 87 | ], |
| 88 | shared_libs: [ |
| 89 | "liblog", |
| 90 | "libnativehelper", |
| 91 | ], |
| 92 | apex_available: [ |
| 93 | "com.android.tethering", |
| 94 | ], |
| 95 | } |
| 96 | |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 97 | cc_library_shared { |
| 98 | name: "libservice-connectivity", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 99 | min_sdk_version: "30", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 100 | cflags: [ |
| 101 | "-Wall", |
| 102 | "-Werror", |
| 103 | "-Wno-unused-parameter", |
| 104 | "-Wthread-safety", |
| 105 | ], |
| 106 | srcs: [ |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 107 | ":services.connectivity-netstats-jni-sources", |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 108 | "jni/com_android_server_BpfNetMaps.cpp", |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 109 | "jni/com_android_server_connectivity_ClatCoordinator.cpp", |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 110 | "jni/com_android_server_TestNetworkService.cpp", |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 111 | "jni/onload.cpp", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 112 | ], |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 113 | header_libs: [ |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 114 | "bpf_connectivity_headers", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 115 | ], |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 116 | static_libs: [ |
| 117 | "libclat", |
| 118 | "libip_checksum", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 119 | "libmodules-utils-build", |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 120 | "libnetjniutils", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 121 | "libnet_utils_device_common_bpfjni", |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 122 | "libtraffic_controller", |
| 123 | "netd_aidl_interface-lateststable-ndk", |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 124 | ], |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 125 | shared_libs: [ |
Maciej Żenczykowski | dcae351 | 2022-01-31 19:59:32 -0800 | [diff] [blame] | 126 | "libbase", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 127 | "libcutils", |
Maciej Żenczykowski | dcae351 | 2022-01-31 19:59:32 -0800 | [diff] [blame] | 128 | "libnetdutils", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 129 | "liblog", |
| 130 | "libnativehelper", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 131 | "libnetworkstats", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 132 | ], |
Pete Bentley | b145611 | 2021-01-07 13:51:18 +0000 | [diff] [blame] | 133 | apex_available: [ |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 134 | "com.android.tethering", |
Pete Bentley | b145611 | 2021-01-07 13:51:18 +0000 | [diff] [blame] | 135 | ], |
| 136 | } |
| 137 | |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 138 | java_library { |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 139 | name: "service-connectivity-pre-jarjar", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 140 | sdk_version: "system_server_current", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 141 | min_sdk_version: "30", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 142 | srcs: [ |
Remi NGUYEN VAN | cdb45f8 | 2021-05-13 12:53:15 +0000 | [diff] [blame] | 143 | "src/**/*.java", |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 144 | ":framework-connectivity-shared-srcs", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 145 | ":services-connectivity-shared-srcs", |
Motomu Utsumi | 166f966 | 2022-09-01 10:35:29 +0900 | [diff] [blame] | 146 | ":statslog-connectivity-java-gen", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 147 | ], |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 148 | libs: [ |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 149 | "framework-annotations-lib", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 150 | "framework-connectivity-pre-jarjar", |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 151 | // The framework-connectivity-t library is only available on T+ platforms |
| 152 | // so any calls to it must be protected with a check to ensure that it is |
| 153 | // available. The linter will detect any unprotected calls through an API |
| 154 | // but not direct calls to the implementation. So, this depends on the |
| 155 | // module lib stubs directly to ensure the linter will work correctly |
| 156 | // as depending on framework-connectivity-t would cause it to be compiled |
| 157 | // against the implementation because the two libraries are in the same |
| 158 | // APEX. |
paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 159 | "framework-connectivity-t.stubs.module_lib", |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 160 | "framework-tethering", |
| 161 | "framework-wifi", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 162 | "unsupportedappusage", |
Remi NGUYEN VAN | 907ebd4 | 2021-03-08 22:05:03 +0900 | [diff] [blame] | 163 | "ServiceConnectivityResources", |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 164 | "framework-statsd", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 165 | ], |
| 166 | static_libs: [ |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 167 | // Do not add libs here if they are already included |
| 168 | // in framework-connectivity |
Hungming Chen | 01f2550 | 2022-06-28 22:47:00 +0800 | [diff] [blame] | 169 | "connectivity-net-module-utils-bpf", |
Tyler Wear | b37f551 | 2021-10-01 13:22:00 -0700 | [diff] [blame] | 170 | "connectivity_native_aidl_interface-lateststable-java", |
Remi NGUYEN VAN | 30bebea | 2021-08-06 14:15:31 +0900 | [diff] [blame] | 171 | "dnsresolver_aidl_interface-V9-java", |
William Escande | ea9e22e | 2021-08-19 12:26:52 +0200 | [diff] [blame] | 172 | "modules-utils-shell-command-handler", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 173 | "net-utils-device-common", |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 174 | "net-utils-device-common-bpf", |
Patrick Rohr | 734f24e | 2022-08-09 19:23:18 -0700 | [diff] [blame] | 175 | "net-utils-device-common-ip", |
Xiao Ma | 09c0727 | 2021-07-01 14:00:34 +0000 | [diff] [blame] | 176 | "net-utils-device-common-netlink", |
Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 177 | "net-utils-services-common", |
lucaslin | ef33753 | 2021-01-18 11:58:24 +0800 | [diff] [blame] | 178 | "netd-client", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 179 | "networkstack-client", |
lifr | c0d25c1 | 2021-03-09 17:24:46 +0800 | [diff] [blame] | 180 | "PlatformProperties", |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 181 | "service-connectivity-protos", |
Remi NGUYEN VAN | ed02d61 | 2022-05-13 16:36:55 +0900 | [diff] [blame] | 182 | "NetworkStackApiStableShims", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 183 | ], |
| 184 | apex_available: [ |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 185 | "com.android.tethering", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 186 | ], |
Chiachang Wang | 3bc5276 | 2021-11-25 14:17:57 +0800 | [diff] [blame] | 187 | lint: { strict_updatability_linting: true }, |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 188 | visibility: [ |
| 189 | "//packages/modules/Connectivity/service-t", |
| 190 | "//packages/modules/Connectivity/tests:__subpackages__", |
| 191 | ], |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 192 | } |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 193 | |
Paul Hu | 3e1f448 | 2022-05-16 20:56:32 +0800 | [diff] [blame] | 194 | // TODO: Remove this temporary library and put code into module when test coverage is enough. |
| 195 | java_library { |
| 196 | name: "service-mdns", |
| 197 | sdk_version: "system_server_current", |
| 198 | min_sdk_version: "30", |
| 199 | srcs: [ |
| 200 | "mdns/**/*.java", |
| 201 | ], |
| 202 | libs: [ |
| 203 | "framework-annotations-lib", |
| 204 | "framework-connectivity-pre-jarjar", |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 205 | "framework-wifi", |
Paul Hu | 3e1f448 | 2022-05-16 20:56:32 +0800 | [diff] [blame] | 206 | "service-connectivity-pre-jarjar", |
| 207 | ], |
| 208 | visibility: [ |
| 209 | "//packages/modules/Connectivity/tests:__subpackages__", |
| 210 | ], |
| 211 | } |
| 212 | |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 213 | java_library { |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 214 | name: "service-connectivity-protos", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 215 | sdk_version: "system_current", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 216 | min_sdk_version: "30", |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 217 | proto: { |
| 218 | type: "nano", |
| 219 | }, |
| 220 | srcs: [ |
| 221 | ":system-messages-proto-src", |
| 222 | ], |
| 223 | libs: ["libprotobuf-java-nano"], |
| 224 | apex_available: [ |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 225 | "com.android.tethering", |
| 226 | ], |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 227 | lint: { |
| 228 | strict_updatability_linting: true, |
| 229 | }, |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 230 | } |
| 231 | |
Paul Duffin | 5fc809f | 2022-05-20 14:15:42 +0000 | [diff] [blame] | 232 | java_defaults { |
| 233 | name: "service-connectivity-defaults", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 234 | sdk_version: "system_server_current", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 235 | min_sdk_version: "30", |
zhidou | b33a263 | 2022-09-06 17:58:20 +0000 | [diff] [blame] | 236 | defaults: [ |
| 237 | "standalone-system-server-module-optimize-defaults", |
| 238 | ], |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 239 | // This library combines system server jars that have access to different bootclasspath jars. |
| 240 | // Lower SDK service jars must not depend on higher SDK jars as that would let them |
| 241 | // transitively depend on the wrong bootclasspath jars. Sources also cannot be added here as |
Remi NGUYEN VAN | 371e7f7 | 2022-07-25 18:52:58 +0900 | [diff] [blame] | 242 | // they would depend on bootclasspath jars that may not be available. |
lifr | c0d25c1 | 2021-03-09 17:24:46 +0800 | [diff] [blame] | 243 | static_libs: [ |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 244 | "service-connectivity-pre-jarjar", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 245 | "service-connectivity-tiramisu-pre-jarjar", |
Remi NGUYEN VAN | b6cde3d | 2022-03-10 04:32:15 +0000 | [diff] [blame] | 246 | "service-nearby-pre-jarjar", |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 247 | ], |
Remi NGUYEN VAN | 371e7f7 | 2022-07-25 18:52:58 +0900 | [diff] [blame] | 248 | // The below libraries are not actually needed to build since no source is compiled |
| 249 | // (only combining prebuilt static_libs), but they are necessary so that R8 has the right |
| 250 | // references to optimize the code. Without these, there will be missing class warnings and |
| 251 | // code may be wrongly optimized. |
| 252 | // R8 runs after jarjar, so the framework-X libraries need to be the post-jarjar artifacts |
| 253 | // (.impl), if they are not just stubs, so that the name of jarjared classes match. |
| 254 | libs: [ |
| 255 | "androidx.annotation_annotation", |
| 256 | "framework-annotations-lib", |
| 257 | "framework-connectivity.impl", |
| 258 | "framework-connectivity-t.impl", |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 259 | "framework-tethering", |
| 260 | "framework-wifi", |
Remi NGUYEN VAN | 371e7f7 | 2022-07-25 18:52:58 +0900 | [diff] [blame] | 261 | "libprotobuf-java-nano", |
| 262 | ], |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 263 | jarjar_rules: ":connectivity-jarjar-rules", |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 264 | apex_available: [ |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 265 | "com.android.tethering", |
| 266 | ], |
Remi NGUYEN VAN | c6f8fb0 | 2022-04-20 18:58:53 +0900 | [diff] [blame] | 267 | optimize: { |
Remi NGUYEN VAN | c6f8fb0 | 2022-04-20 18:58:53 +0900 | [diff] [blame] | 268 | proguard_flags_files: ["proguard.flags"], |
| 269 | }, |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 270 | lint: { |
| 271 | strict_updatability_linting: true, |
| 272 | }, |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 273 | } |
Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 274 | |
Paul Duffin | 5fc809f | 2022-05-20 14:15:42 +0000 | [diff] [blame] | 275 | // A special library created strictly for use by the tests as they need the |
| 276 | // implementation library but that is not available when building from prebuilts. |
| 277 | // Using a library with a different name to what is used by the prebuilts ensures |
| 278 | // that this will never depend on the prebuilt. |
| 279 | // Switching service-connectivity to a java_sdk_library would also have worked as |
| 280 | // that has built in support for managing this but that is too big a change at this |
| 281 | // point. |
| 282 | java_library { |
| 283 | name: "service-connectivity-for-tests", |
| 284 | defaults: ["service-connectivity-defaults"], |
| 285 | } |
| 286 | |
| 287 | java_library { |
| 288 | name: "service-connectivity", |
| 289 | defaults: ["service-connectivity-defaults"], |
| 290 | installable: true, |
| 291 | } |
| 292 | |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 293 | genrule { |
Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 294 | name: "connectivity-jarjar-rules", |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 295 | defaults: ["jarjar-rules-combine-defaults"], |
| 296 | srcs: [ |
| 297 | ":framework-connectivity-jarjar-rules", |
| 298 | ":service-connectivity-jarjar-gen", |
| 299 | ":service-nearby-jarjar-gen", |
| 300 | ], |
| 301 | out: ["connectivity-jarjar-rules.txt"], |
Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 302 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 303 | } |
Wayne Ma | 0ea3bdc | 2022-01-12 01:12:11 +0800 | [diff] [blame] | 304 | |
| 305 | // TODO: This filegroup temporary exposes for NetworkStats. It should be |
| 306 | // removed right after NetworkStats moves into mainline module. |
| 307 | filegroup { |
| 308 | name: "traffic-controller-utils", |
| 309 | srcs: ["src/com/android/server/BpfNetMaps.java"], |
| 310 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 311 | } |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 312 | |
| 313 | java_genrule { |
| 314 | name: "service-connectivity-jarjar-gen", |
| 315 | tool_files: [ |
| 316 | ":service-connectivity-pre-jarjar{.jar}", |
| 317 | ":service-connectivity-tiramisu-pre-jarjar{.jar}", |
| 318 | "jarjar-excludes.txt", |
| 319 | ], |
| 320 | tools: [ |
| 321 | "jarjar-rules-generator", |
| 322 | ], |
| 323 | out: ["service_connectivity_jarjar_rules.txt"], |
| 324 | cmd: "$(location jarjar-rules-generator) " + |
Remi NGUYEN VAN | 0bd90f1 | 2022-08-10 20:15:46 +0900 | [diff] [blame] | 325 | "$(location :service-connectivity-pre-jarjar{.jar}) " + |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 326 | "$(location :service-connectivity-tiramisu-pre-jarjar{.jar}) " + |
| 327 | "--prefix android.net.connectivity " + |
| 328 | "--excludes $(location jarjar-excludes.txt) " + |
| 329 | "--output $(out)", |
| 330 | visibility: ["//visibility:private"], |
| 331 | } |
| 332 | |
| 333 | java_genrule { |
| 334 | name: "service-nearby-jarjar-gen", |
| 335 | tool_files: [ |
| 336 | ":service-nearby-pre-jarjar{.jar}", |
| 337 | "jarjar-excludes.txt", |
| 338 | ], |
| 339 | tools: [ |
| 340 | "jarjar-rules-generator", |
| 341 | ], |
| 342 | out: ["service_nearby_jarjar_rules.txt"], |
| 343 | cmd: "$(location jarjar-rules-generator) " + |
Remi NGUYEN VAN | 0bd90f1 | 2022-08-10 20:15:46 +0900 | [diff] [blame] | 344 | "$(location :service-nearby-pre-jarjar{.jar}) " + |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 345 | "--prefix com.android.server.nearby " + |
| 346 | "--excludes $(location jarjar-excludes.txt) " + |
| 347 | "--output $(out)", |
| 348 | visibility: ["//visibility:private"], |
| 349 | } |
Motomu Utsumi | 166f966 | 2022-09-01 10:35:29 +0900 | [diff] [blame] | 350 | |
| 351 | genrule { |
Paul Duffin | 5118a52 | 2022-10-05 18:34:24 +0100 | [diff] [blame^] | 352 | name: "statslog-connectivity-java-gen", |
| 353 | tools: ["stats-log-api-gen"], |
| 354 | cmd: "$(location stats-log-api-gen) --java $(out) --module connectivity --javaPackage com.android.server --javaClass ConnectivityStatsLog", |
| 355 | out: ["com/android/server/ConnectivityStatsLog.java"], |
Motomu Utsumi | 166f966 | 2022-09-01 10:35:29 +0900 | [diff] [blame] | 356 | } |