blob: 5ba6a0099ec574536cfdc92aeaed294f8904f5ab [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",
39 ],
40 shared_libs: [
41 "liblog",
42 "libnativehelper",
43 ],
44 apex_available: [
45 "com.android.tethering",
46 ],
47}
48
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +000049cc_library_shared {
50 name: "libservice-connectivity",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000051 min_sdk_version: "30",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090052 cflags: [
53 "-Wall",
54 "-Werror",
55 "-Wno-unused-parameter",
56 "-Wthread-safety",
57 ],
58 srcs: [
59 "jni/com_android_server_TestNetworkService.cpp",
Hungming Chene2cf0552021-12-25 17:05:41 +080060 "jni/com_android_server_connectivity_ClatCoordinator.cpp",
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +000061 "jni/onload.cpp",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090062 ],
Remi NGUYEN VAN4be92df2021-03-24 01:49:39 +000063 stl: "libc++_static",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000064 header_libs: [
65 "libbase_headers",
66 ],
Hungming Chene2cf0552021-12-25 17:05:41 +080067 static_libs: [
68 "libclat",
69 "libip_checksum",
70 "libnetjniutils",
71 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090072 shared_libs: [
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090073 "liblog",
74 "libnativehelper",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090075 ],
Pete Bentleyb1456112021-01-07 13:51:18 +000076 apex_available: [
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +000077 "com.android.tethering",
Pete Bentleyb1456112021-01-07 13:51:18 +000078 ],
79}
80
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090081java_library {
Aaron Huang63338842021-01-08 18:32:00 +080082 name: "service-connectivity-pre-jarjar",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +000083 sdk_version: "system_server_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +000084 min_sdk_version: "30",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090085 srcs: [
Remi NGUYEN VANcdb45f82021-05-13 12:53:15 +000086 "src/**/*.java",
Aaron Huang63338842021-01-08 18:32:00 +080087 ":framework-connectivity-shared-srcs",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +000088 ":services-connectivity-shared-srcs",
Remi NGUYEN VAN58cd2452021-07-07 17:45:45 +090089 // TODO: move to net-utils-device-common
90 ":connectivity-module-utils-srcs",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090091 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090092 libs: [
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +000093 "framework-annotations-lib",
94 "framework-connectivity.impl",
95 "framework-tethering.stubs.module_lib",
96 "framework-wifi.stubs.module_lib",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090097 "unsupportedappusage",
Remi NGUYEN VAN907ebd42021-03-08 22:05:03 +090098 "ServiceConnectivityResources",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +090099 ],
100 static_libs: [
Remi NGUYEN VAN30bebea2021-08-06 14:15:31 +0900101 "dnsresolver_aidl_interface-V9-java",
Remi NGUYEN VAN58cd2452021-07-07 17:45:45 +0900102 "modules-utils-build",
William Escandeea9e22e2021-08-19 12:26:52 +0200103 "modules-utils-shell-command-handler",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900104 "net-utils-device-common",
markchien8fb75e32021-11-11 17:53:56 +0800105 "net-utils-device-common-bpf",
Xiao Ma09c07272021-07-01 14:00:34 +0000106 "net-utils-device-common-netlink",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900107 "net-utils-framework-common",
lucaslinef337532021-01-18 11:58:24 +0800108 "netd-client",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000109 "networkstack-client",
lifrc0d25c12021-03-09 17:24:46 +0800110 "PlatformProperties",
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900111 "service-connectivity-protos",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900112 ],
113 apex_available: [
Remi NGUYEN VANeaa96582021-01-08 01:19:44 +0000114 "com.android.tethering",
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900115 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800116 lint: { strict_updatability_linting: true },
paulhu802ab972021-12-14 01:30:22 +0000117 visibility: [
118 "//packages/modules/Connectivity/service-t",
119 "//packages/modules/Connectivity/tests:__subpackages__",
120 ],
Remi NGUYEN VAN59262cb2020-12-21 18:40:08 +0900121}
Aaron Huang63338842021-01-08 18:32:00 +0800122
123java_library {
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900124 name: "service-connectivity-protos",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000125 sdk_version: "system_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +0000126 min_sdk_version: "30",
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900127 proto: {
128 type: "nano",
129 },
130 srcs: [
131 ":system-messages-proto-src",
132 ],
133 libs: ["libprotobuf-java-nano"],
134 apex_available: [
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900135 "com.android.tethering",
136 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800137 lint: { strict_updatability_linting: true },
Remi NGUYEN VANd8bc0fa2021-03-11 15:41:52 +0900138}
139
140java_library {
Aaron Huang63338842021-01-08 18:32:00 +0800141 name: "service-connectivity",
Remi NGUYEN VAN4ee6c502021-03-22 10:25:12 +0000142 sdk_version: "system_server_current",
Remi NGUYEN VANda43ef02021-03-23 14:45:58 +0000143 min_sdk_version: "30",
Aaron Huang63338842021-01-08 18:32:00 +0800144 installable: true,
paulhu802ab972021-12-14 01:30:22 +0000145 // This library combines system server jars that have access to different bootclasspath jars.
146 // Lower SDK service jars must not depend on higher SDK jars as that would let them
147 // transitively depend on the wrong bootclasspath jars. Sources also cannot be added here as
148 // they would transitively depend on bootclasspath jars that may not be available.
lifrc0d25c12021-03-09 17:24:46 +0800149 static_libs: [
Aaron Huang63338842021-01-08 18:32:00 +0800150 "service-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +0000151 "service-connectivity-tiramisu-pre-jarjar",
Aaron Huang63338842021-01-08 18:32:00 +0800152 ],
153 jarjar_rules: "jarjar-rules.txt",
154 apex_available: [
Aaron Huang63338842021-01-08 18:32:00 +0800155 "com.android.tethering",
156 ],
Chiachang Wang3bc52762021-11-25 14:17:57 +0800157 lint: { strict_updatability_linting: true },
Aaron Huang63338842021-01-08 18:32:00 +0800158}
Remi NGUYEN VAN8ea5ee62021-06-28 18:48:43 +0900159
160filegroup {
161 name: "connectivity-jarjar-rules",
162 srcs: ["jarjar-rules.txt"],
163 visibility: ["//packages/modules/Connectivity:__subpackages__"],
164}