blob: 0e6fe92b3b19275458e9e450991ba00ab636e115 [file] [log] [blame]
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +09001//
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 Badour6c7ed9d2021-02-12 17:07:05 -080017package {
18 // See: http://go/android-license-faq
Baligh Uddin36847132021-05-23 16:38:40 +000019 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour6c7ed9d2021-02-12 17:07:05 -080020}
21
markchien8fb75e32021-11-11 17:53:56 +080022// The library name match the service-connectivity jarjar rules that put the JNI utils in the
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090023// android.net.connectivity.com.android.net.module.util package.
markchien8fb75e32021-11-11 17:53:56 +080024cc_library_shared {
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090025 name: "libandroid_net_connectivity_com_android_net_module_util_jni",
markchien8fb75e32021-11-11 17:53:56 +080026 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 ],
markchien8fb75e32021-11-11 17:53:56 +080036 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 VANeaa96582021-01-08 01:19:44 +000048cc_library_shared {
49 name: "libservice-connectivity",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000050 min_sdk_version: "30",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090051 cflags: [
52 "-Wall",
53 "-Werror",
54 "-Wno-unused-parameter",
55 "-Wthread-safety",
56 ],
57 srcs: [
Remi NGUYEN VANd9504892022-02-02 13:03:29 +090058 ":services.connectivity-netstats-jni-sources",
Patrick Rohr361b8592022-01-28 15:39:17 +010059 "jni/com_android_server_BpfNetMaps.cpp",
Hungming Chene2cf0552021-12-25 17:05:41 +080060 "jni/com_android_server_connectivity_ClatCoordinator.cpp",
Patrick Rohr361b8592022-01-28 15:39:17 +010061 "jni/com_android_server_TestNetworkService.cpp",
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +000062 "jni/onload.cpp",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090063 ],
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000064 header_libs: [
Patrick Rohr361b8592022-01-28 15:39:17 +010065 "bpf_connectivity_headers",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000066 ],
Hungming Chene2cf0552021-12-25 17:05:41 +080067 static_libs: [
68 "libclat",
69 "libip_checksum",
Remi NGUYEN VANd9504892022-02-02 13:03:29 +090070 "libmodules-utils-build",
Hungming Chene2cf0552021-12-25 17:05:41 +080071 "libnetjniutils",
Remi NGUYEN VANd9504892022-02-02 13:03:29 +090072 "libnet_utils_device_common_bpfjni",
Patrick Rohr361b8592022-01-28 15:39:17 +010073 "libtraffic_controller",
74 "netd_aidl_interface-lateststable-ndk",
Hungming Chene2cf0552021-12-25 17:05:41 +080075 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090076 shared_libs: [
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080077 "libbase",
Remi NGUYEN VANd9504892022-02-02 13:03:29 +090078 "libcutils",
Maciej Żenczykowskidcae3512022-01-31 19:59:32 -080079 "libnetdutils",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090080 "liblog",
81 "libnativehelper",
Remi NGUYEN VANd9504892022-02-02 13:03:29 +090082 "libnetworkstats",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090083 ],
Pete Bentleyb1456112021-01-07 13:51:18 +000084 apex_available: [
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +000085 "com.android.tethering",
Pete Bentleyb1456112021-01-07 13:51:18 +000086 ],
87}
88
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090089java_library {
Aaron Huang63338842021-01-08 18:32:00 +080090 name: "service-connectivity-pre-jarjar",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +000091 sdk_version: "system_server_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000092 min_sdk_version: "30",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090093 srcs: [
Remi NGUYEN VANcdb45f82021-05-13 12:53:15 +000094 "src/**/*.java",
Aaron Huang63338842021-01-08 18:32:00 +080095 ":framework-connectivity-shared-srcs",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +000096 ":services-connectivity-shared-srcs",
Remi NGUYEN VAN58cd2452021-07-07 17:45:45 +090097 // TODO: move to net-utils-device-common
98 ":connectivity-module-utils-srcs",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090099 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900100 libs: [
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000101 "framework-annotations-lib",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +0900102 "framework-connectivity-pre-jarjar",
paulhu537f7202022-02-08 21:25:28 +0800103 "framework-connectivity-t.stubs.module_lib",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000104 "framework-tethering.stubs.module_lib",
105 "framework-wifi.stubs.module_lib",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900106 "unsupportedappusage",
Remi NGUYEN VAN907ebd42021-03-08 22:05:03 +0900107 "ServiceConnectivityResources",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900108 ],
109 static_libs: [
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +0900110 // Do not add libs here if they are already included
111 // in framework-connectivity
Remi NGUYEN VAN30bebea2021-08-06 14:15:31 +0900112 "dnsresolver_aidl_interface-V9-java",
William Escandeea9e22e2021-08-19 12:26:52 +0200113 "modules-utils-shell-command-handler",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900114 "net-utils-device-common",
markchien8fb75e32021-11-11 17:53:56 +0800115 "net-utils-device-common-bpf",
Xiao Ma09c07272021-07-01 14:00:34 +0000116 "net-utils-device-common-netlink",
Xiao Ma0a171c02022-01-23 16:14:51 +0000117 "net-utils-services-common",
lucaslinef337532021-01-18 11:58:24 +0800118 "netd-client",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000119 "networkstack-client",
lifrc0d25c12021-03-09 17:24:46 +0800120 "PlatformProperties",
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900121 "service-connectivity-protos",
Chalard Jean47e778e2022-01-26 19:12:21 +0900122 "NetworkStackApiCurrentShims",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900123 ],
124 apex_available: [
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +0000125 "com.android.tethering",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900126 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800127 lint: { strict_updatability_linting: true },
paulhu802ab972021-12-14 01:30:22 +0000128 visibility: [
129 "//packages/modules/Connectivity/service-t",
130 "//packages/modules/Connectivity/tests:__subpackages__",
131 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900132}
Aaron Huang63338842021-01-08 18:32:00 +0800133
134java_library {
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900135 name: "service-connectivity-protos",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000136 sdk_version: "system_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +0000137 min_sdk_version: "30",
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900138 proto: {
139 type: "nano",
140 },
141 srcs: [
142 ":system-messages-proto-src",
143 ],
144 libs: ["libprotobuf-java-nano"],
145 apex_available: [
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900146 "com.android.tethering",
147 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800148 lint: { strict_updatability_linting: true },
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900149}
150
151java_library {
Aaron Huang63338842021-01-08 18:32:00 +0800152 name: "service-connectivity",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000153 sdk_version: "system_server_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +0000154 min_sdk_version: "30",
Aaron Huang63338842021-01-08 18:32:00 +0800155 installable: true,
paulhu802ab972021-12-14 01:30:22 +0000156 // This library combines system server jars that have access to different bootclasspath jars.
157 // Lower SDK service jars must not depend on higher SDK jars as that would let them
158 // transitively depend on the wrong bootclasspath jars. Sources also cannot be added here as
159 // they would transitively depend on bootclasspath jars that may not be available.
lifrc0d25c12021-03-09 17:24:46 +0800160 static_libs: [
Aaron Huang63338842021-01-08 18:32:00 +0800161 "service-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +0000162 "service-connectivity-tiramisu-pre-jarjar",
Remi NGUYEN VANb6cde3d2022-03-10 04:32:15 +0000163 "service-nearby-pre-jarjar",
Aaron Huang63338842021-01-08 18:32:00 +0800164 ],
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +0900165 jarjar_rules: ":connectivity-jarjar-rules",
Aaron Huang63338842021-01-08 18:32:00 +0800166 apex_available: [
Aaron Huang63338842021-01-08 18:32:00 +0800167 "com.android.tethering",
168 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800169 lint: { strict_updatability_linting: true },
Aaron Huang63338842021-01-08 18:32:00 +0800170}
Remi NGUYEN VAN8ea5ee62021-06-28 18:48:43 +0900171
172filegroup {
173 name: "connectivity-jarjar-rules",
174 srcs: ["jarjar-rules.txt"],
175 visibility: ["//packages/modules/Connectivity:__subpackages__"],
176}
Wayne Ma0ea3bdc2022-01-12 01:12:11 +0800177
178// TODO: This filegroup temporary exposes for NetworkStats. It should be
179// removed right after NetworkStats moves into mainline module.
180filegroup {
181 name: "traffic-controller-utils",
182 srcs: ["src/com/android/server/BpfNetMaps.java"],
183 visibility: ["//packages/modules/Connectivity:__subpackages__"],
184}