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