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 | |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 22 | // 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] | 23 | // android.net.connectivity.com.android.net.module.util package. |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 24 | cc_library_shared { |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 25 | name: "libandroid_net_connectivity_com_android_net_module_util_jni", |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 26 | min_sdk_version: "30", |
| 27 | cflags: [ |
| 28 | "-Wall", |
| 29 | "-Werror", |
| 30 | "-Wno-unused-parameter", |
| 31 | "-Wthread-safety", |
| 32 | ], |
| 33 | srcs: [ |
| 34 | "jni/com_android_net_module_util/onload.cpp", |
| 35 | ], |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 36 | static_libs: [ |
| 37 | "libnet_utils_device_common_bpfjni", |
| 38 | ], |
| 39 | shared_libs: [ |
| 40 | "liblog", |
| 41 | "libnativehelper", |
| 42 | ], |
| 43 | apex_available: [ |
| 44 | "com.android.tethering", |
| 45 | ], |
| 46 | } |
| 47 | |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 48 | cc_library_shared { |
| 49 | name: "libservice-connectivity", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 50 | min_sdk_version: "30", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 51 | cflags: [ |
| 52 | "-Wall", |
| 53 | "-Werror", |
| 54 | "-Wno-unused-parameter", |
| 55 | "-Wthread-safety", |
| 56 | ], |
| 57 | srcs: [ |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 58 | ":services.connectivity-netstats-jni-sources", |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 59 | "jni/com_android_server_BpfNetMaps.cpp", |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 60 | "jni/com_android_server_connectivity_ClatCoordinator.cpp", |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 61 | "jni/com_android_server_TestNetworkService.cpp", |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 62 | "jni/onload.cpp", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 63 | ], |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 64 | header_libs: [ |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 65 | "bpf_connectivity_headers", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 66 | ], |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 67 | static_libs: [ |
| 68 | "libclat", |
| 69 | "libip_checksum", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 70 | "libmodules-utils-build", |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 71 | "libnetjniutils", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 72 | "libnet_utils_device_common_bpfjni", |
Patrick Rohr | 361b859 | 2022-01-28 15:39:17 +0100 | [diff] [blame] | 73 | "libtraffic_controller", |
| 74 | "netd_aidl_interface-lateststable-ndk", |
Hungming Chen | e2cf055 | 2021-12-25 17:05:41 +0800 | [diff] [blame] | 75 | ], |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 76 | shared_libs: [ |
Maciej Żenczykowski | dcae351 | 2022-01-31 19:59:32 -0800 | [diff] [blame] | 77 | "libbase", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 78 | "libcutils", |
Maciej Żenczykowski | dcae351 | 2022-01-31 19:59:32 -0800 | [diff] [blame] | 79 | "libnetdutils", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 80 | "liblog", |
| 81 | "libnativehelper", |
Remi NGUYEN VAN | d950489 | 2022-02-02 13:03:29 +0900 | [diff] [blame] | 82 | "libnetworkstats", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 83 | ], |
Pete Bentley | b145611 | 2021-01-07 13:51:18 +0000 | [diff] [blame] | 84 | apex_available: [ |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 85 | "com.android.tethering", |
Pete Bentley | b145611 | 2021-01-07 13:51:18 +0000 | [diff] [blame] | 86 | ], |
| 87 | } |
| 88 | |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 89 | java_library { |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 90 | name: "service-connectivity-pre-jarjar", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 91 | sdk_version: "system_server_current", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 92 | min_sdk_version: "30", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 93 | srcs: [ |
Remi NGUYEN VAN | cdb45f8 | 2021-05-13 12:53:15 +0000 | [diff] [blame] | 94 | "src/**/*.java", |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 95 | ":framework-connectivity-shared-srcs", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 96 | ":services-connectivity-shared-srcs", |
Remi NGUYEN VAN | 58cd245 | 2021-07-07 17:45:45 +0900 | [diff] [blame] | 97 | // TODO: move to net-utils-device-common |
| 98 | ":connectivity-module-utils-srcs", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 99 | ], |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 100 | libs: [ |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 101 | "framework-annotations-lib", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 102 | "framework-connectivity-pre-jarjar", |
paulhu | 537f720 | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 103 | "framework-connectivity-t.stubs.module_lib", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 104 | "framework-tethering.stubs.module_lib", |
| 105 | "framework-wifi.stubs.module_lib", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 106 | "unsupportedappusage", |
Remi NGUYEN VAN | 907ebd4 | 2021-03-08 22:05:03 +0900 | [diff] [blame] | 107 | "ServiceConnectivityResources", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 108 | ], |
| 109 | static_libs: [ |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 110 | // Do not add libs here if they are already included |
| 111 | // in framework-connectivity |
Remi NGUYEN VAN | 30bebea | 2021-08-06 14:15:31 +0900 | [diff] [blame] | 112 | "dnsresolver_aidl_interface-V9-java", |
William Escande | ea9e22e | 2021-08-19 12:26:52 +0200 | [diff] [blame] | 113 | "modules-utils-shell-command-handler", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 114 | "net-utils-device-common", |
markchien | 8fb75e3 | 2021-11-11 17:53:56 +0800 | [diff] [blame] | 115 | "net-utils-device-common-bpf", |
Xiao Ma | 09c0727 | 2021-07-01 14:00:34 +0000 | [diff] [blame] | 116 | "net-utils-device-common-netlink", |
lucaslin | ef33753 | 2021-01-18 11:58:24 +0800 | [diff] [blame] | 117 | "netd-client", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 118 | "networkstack-client", |
lifr | c0d25c1 | 2021-03-09 17:24:46 +0800 | [diff] [blame] | 119 | "PlatformProperties", |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 120 | "service-connectivity-protos", |
Chalard Jean | 47e778e | 2022-01-26 19:12:21 +0900 | [diff] [blame] | 121 | "NetworkStackApiCurrentShims", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 122 | ], |
| 123 | apex_available: [ |
Remi NGUYEN VAN | eaa9658 | 2021-01-08 01:19:44 +0000 | [diff] [blame] | 124 | "com.android.tethering", |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 125 | ], |
Chiachang Wang | 3bc5276 | 2021-11-25 14:17:57 +0800 | [diff] [blame] | 126 | lint: { strict_updatability_linting: true }, |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 127 | visibility: [ |
| 128 | "//packages/modules/Connectivity/service-t", |
| 129 | "//packages/modules/Connectivity/tests:__subpackages__", |
| 130 | ], |
Remi NGUYEN VAN | 59262cb | 2020-12-21 18:40:08 +0900 | [diff] [blame] | 131 | } |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 132 | |
| 133 | java_library { |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 134 | name: "service-connectivity-protos", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 135 | sdk_version: "system_current", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 136 | min_sdk_version: "30", |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 137 | proto: { |
| 138 | type: "nano", |
| 139 | }, |
| 140 | srcs: [ |
| 141 | ":system-messages-proto-src", |
| 142 | ], |
| 143 | libs: ["libprotobuf-java-nano"], |
| 144 | apex_available: [ |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 145 | "com.android.tethering", |
| 146 | ], |
Chiachang Wang | 3bc5276 | 2021-11-25 14:17:57 +0800 | [diff] [blame] | 147 | lint: { strict_updatability_linting: true }, |
Remi NGUYEN VAN | d8bc0fa | 2021-03-11 15:41:52 +0900 | [diff] [blame] | 148 | } |
| 149 | |
| 150 | java_library { |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 151 | name: "service-connectivity", |
Remi NGUYEN VAN | 4ee6c50 | 2021-03-22 10:25:12 +0000 | [diff] [blame] | 152 | sdk_version: "system_server_current", |
Remi NGUYEN VAN | da43ef0 | 2021-03-23 14:45:58 +0000 | [diff] [blame] | 153 | min_sdk_version: "30", |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 154 | installable: true, |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 155 | // This library combines system server jars that have access to different bootclasspath jars. |
| 156 | // Lower SDK service jars must not depend on higher SDK jars as that would let them |
| 157 | // transitively depend on the wrong bootclasspath jars. Sources also cannot be added here as |
| 158 | // they would transitively depend on bootclasspath jars that may not be available. |
lifr | c0d25c1 | 2021-03-09 17:24:46 +0800 | [diff] [blame] | 159 | static_libs: [ |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 160 | "service-connectivity-pre-jarjar", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 161 | "service-connectivity-tiramisu-pre-jarjar", |
Remi NGUYEN VAN | b6cde3d | 2022-03-10 04:32:15 +0000 | [diff] [blame] | 162 | "service-nearby-pre-jarjar", |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 163 | ], |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 164 | jarjar_rules: ":connectivity-jarjar-rules", |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 165 | apex_available: [ |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 166 | "com.android.tethering", |
| 167 | ], |
Chiachang Wang | 3bc5276 | 2021-11-25 14:17:57 +0800 | [diff] [blame] | 168 | lint: { strict_updatability_linting: true }, |
Aaron Huang | 6333884 | 2021-01-08 18:32:00 +0800 | [diff] [blame] | 169 | } |
Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 170 | |
| 171 | filegroup { |
| 172 | name: "connectivity-jarjar-rules", |
| 173 | srcs: ["jarjar-rules.txt"], |
| 174 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 175 | } |
Wayne Ma | 0ea3bdc | 2022-01-12 01:12:11 +0800 | [diff] [blame] | 176 | |
| 177 | // TODO: This filegroup temporary exposes for NetworkStats. It should be |
| 178 | // removed right after NetworkStats moves into mainline module. |
| 179 | filegroup { |
| 180 | name: "traffic-controller-utils", |
| 181 | srcs: ["src/com/android/server/BpfNetMaps.java"], |
| 182 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 183 | } |