blob: a26f715280a1c97fa88e6be74346da48cbe6b43b [file] [log] [blame]
Remi NGUYEN VANa985e582020-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
17cc_defaults {
18 name: "libservice-connectivity-defaults",
19 // TODO: build against the NDK (sdk_version: "30" for example)
20 cflags: [
21 "-Wall",
22 "-Werror",
23 "-Wno-unused-parameter",
24 "-Wthread-safety",
25 ],
26 srcs: [
27 "jni/com_android_server_TestNetworkService.cpp",
28 "jni/com_android_server_connectivity_Vpn.cpp",
29 ],
30 shared_libs: [
31 "libbase",
32 "liblog",
33 "libnativehelper",
34 // TODO: remove dependency on ifc_[add/del]_address by having Java code to add/delete
35 // addresses, and remove dependency on libnetutils.
36 "libnetutils",
37 ],
38}
39
40cc_library_shared {
41 name: "libservice-connectivity",
42 defaults: ["libservice-connectivity-defaults"],
43 srcs: [
44 "jni/onload.cpp",
45 ],
46 apex_available: [
47 // TODO: move this library to the tethering APEX and remove libservice-connectivity-static
48 // "com.android.tethering",
49 ],
50}
51
52// Static library linked into libservices.core until libservice-connectivity can be loaded from
53// the tethering APEX instead.
54cc_library_static {
55 name: "libservice-connectivity-static",
56 defaults: ["libservice-connectivity-defaults"],
57}
58
59java_library {
60 name: "service-connectivity",
61 srcs: [
62 ":connectivity-service-srcs",
63 ],
64 installable: true,
65 jarjar_rules: "jarjar-rules.txt",
66 libs: [
67 "android.net.ipsec.ike",
68 "services.core",
69 "services.net",
70 "unsupportedappusage",
71 ],
72 static_libs: [
73 "net-utils-device-common",
74 "net-utils-framework-common",
75 ],
76 apex_available: [
77 "//apex_available:platform",
78 ],
79}