blob: d9400033189f9616d0ac413b551168e8ac67cd42 [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
23// com.android.connectivity.com.android.net.module.util package.
24cc_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",
Patrick Rohre258c592022-01-18 16:34:59 +010039 "libtcutils",
markchien8fb75e32021-11-11 17:53:56 +080040 ],
41 shared_libs: [
42 "liblog",
43 "libnativehelper",
44 ],
45 apex_available: [
46 "com.android.tethering",
47 ],
48}
49
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +000050cc_library_shared {
51 name: "libservice-connectivity",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000052 min_sdk_version: "30",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090053 cflags: [
54 "-Wall",
55 "-Werror",
56 "-Wno-unused-parameter",
57 "-Wthread-safety",
58 ],
59 srcs: [
Patrick Rohr361b8592022-01-28 15:39:17 +010060 "jni/com_android_server_BpfNetMaps.cpp",
Hungming Chene2cf0552021-12-25 17:05:41 +080061 "jni/com_android_server_connectivity_ClatCoordinator.cpp",
Patrick Rohr361b8592022-01-28 15:39:17 +010062 "jni/com_android_server_TestNetworkService.cpp",
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +000063 "jni/onload.cpp",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090064 ],
Remi NGUYEN VAN4be92df2021-03-24 01:49:39 +000065 stl: "libc++_static",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000066 header_libs: [
Patrick Rohr361b8592022-01-28 15:39:17 +010067 "bpf_connectivity_headers",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000068 "libbase_headers",
69 ],
Hungming Chene2cf0552021-12-25 17:05:41 +080070 static_libs: [
Hungming Chenb1d3ccb2022-01-16 14:47:52 +080071 "libbase",
Hungming Chene2cf0552021-12-25 17:05:41 +080072 "libclat",
73 "libip_checksum",
Patrick Rohr361b8592022-01-28 15:39:17 +010074 "libnetdutils",
Hungming Chene2cf0552021-12-25 17:05:41 +080075 "libnetjniutils",
Patrick Rohr361b8592022-01-28 15:39:17 +010076 "libtraffic_controller",
77 "netd_aidl_interface-lateststable-ndk",
Hungming Chene2cf0552021-12-25 17:05:41 +080078 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090079 shared_libs: [
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090080 "liblog",
81 "libnativehelper",
Patrick Rohr361b8592022-01-28 15:39:17 +010082 "libutils",
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",
102 "framework-connectivity.impl",
103 "framework-tethering.stubs.module_lib",
104 "framework-wifi.stubs.module_lib",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900105 "unsupportedappusage",
Remi NGUYEN VAN907ebd42021-03-08 22:05:03 +0900106 "ServiceConnectivityResources",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900107 ],
108 static_libs: [
Remi NGUYEN VAN30bebea2021-08-06 14:15:31 +0900109 "dnsresolver_aidl_interface-V9-java",
Remi NGUYEN VAN58cd2452021-07-07 17:45:45 +0900110 "modules-utils-build",
William Escandeea9e22e2021-08-19 12:26:52 +0200111 "modules-utils-shell-command-handler",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900112 "net-utils-device-common",
markchien8fb75e32021-11-11 17:53:56 +0800113 "net-utils-device-common-bpf",
Xiao Ma09c07272021-07-01 14:00:34 +0000114 "net-utils-device-common-netlink",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900115 "net-utils-framework-common",
lucaslinef337532021-01-18 11:58:24 +0800116 "netd-client",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000117 "networkstack-client",
lifrc0d25c12021-03-09 17:24:46 +0800118 "PlatformProperties",
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900119 "service-connectivity-protos",
Chalard Jean47e778e2022-01-26 19:12:21 +0900120 "NetworkStackApiCurrentShims",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900121 ],
122 apex_available: [
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +0000123 "com.android.tethering",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900124 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800125 lint: { strict_updatability_linting: true },
paulhu802ab972021-12-14 01:30:22 +0000126 visibility: [
127 "//packages/modules/Connectivity/service-t",
128 "//packages/modules/Connectivity/tests:__subpackages__",
129 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900130}
Aaron Huang63338842021-01-08 18:32:00 +0800131
132java_library {
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900133 name: "service-connectivity-protos",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000134 sdk_version: "system_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +0000135 min_sdk_version: "30",
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900136 proto: {
137 type: "nano",
138 },
139 srcs: [
140 ":system-messages-proto-src",
141 ],
142 libs: ["libprotobuf-java-nano"],
143 apex_available: [
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900144 "com.android.tethering",
145 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800146 lint: { strict_updatability_linting: true },
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900147}
148
149java_library {
Aaron Huang63338842021-01-08 18:32:00 +0800150 name: "service-connectivity",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000151 sdk_version: "system_server_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +0000152 min_sdk_version: "30",
Aaron Huang63338842021-01-08 18:32:00 +0800153 installable: true,
paulhu802ab972021-12-14 01:30:22 +0000154 // This library combines system server jars that have access to different bootclasspath jars.
155 // Lower SDK service jars must not depend on higher SDK jars as that would let them
156 // transitively depend on the wrong bootclasspath jars. Sources also cannot be added here as
157 // they would transitively depend on bootclasspath jars that may not be available.
lifrc0d25c12021-03-09 17:24:46 +0800158 static_libs: [
Aaron Huang63338842021-01-08 18:32:00 +0800159 "service-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +0000160 "service-connectivity-tiramisu-pre-jarjar",
Aaron Huang63338842021-01-08 18:32:00 +0800161 ],
162 jarjar_rules: "jarjar-rules.txt",
163 apex_available: [
Aaron Huang63338842021-01-08 18:32:00 +0800164 "com.android.tethering",
165 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800166 lint: { strict_updatability_linting: true },
Aaron Huang63338842021-01-08 18:32:00 +0800167}
Remi NGUYEN VAN8ea5ee62021-06-28 18:48:43 +0900168
169filegroup {
170 name: "connectivity-jarjar-rules",
171 srcs: ["jarjar-rules.txt"],
172 visibility: ["//packages/modules/Connectivity:__subpackages__"],
173}
Wayne Ma0ea3bdc2022-01-12 01:12:11 +0800174
175// TODO: This filegroup temporary exposes for NetworkStats. It should be
176// removed right after NetworkStats moves into mainline module.
177filegroup {
178 name: "traffic-controller-utils",
179 srcs: ["src/com/android/server/BpfNetMaps.java"],
180 visibility: ["//packages/modules/Connectivity:__subpackages__"],
181}