blob: 7b35f4d56a7a43f86f1dc5256024be7b81f57c53 [file] [log] [blame]
markchien017fef22019-08-27 10:19:38 +08001//
2// Copyright (C) 2019 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
17java_defaults {
18 name: "TetheringAndroidLibraryDefaults",
19 platform_apis: true,
20 srcs: [
21 "src/**/*.java",
markchiena6ba54d2019-09-03 15:58:06 +080022 ":framework-tethering-shared-srcs",
Remi NGUYEN VAN882d8b32019-08-09 15:52:06 +090023 ":net-module-utils-srcs",
markchiena6ba54d2019-09-03 15:58:06 +080024 ":services-tethering-shared-srcs",
markchienf303c5a2019-09-23 20:29:54 +080025 ":servicescore-tethering-src",
markchien017fef22019-08-27 10:19:38 +080026 ],
27 static_libs: [
28 "androidx.annotation_annotation",
markchien08cc0302019-09-09 20:50:49 +080029 "netd_aidl_interface-java",
Remi NGUYEN VAN882d8b32019-08-09 15:52:06 +090030 "netlink-client",
markchien08cc0302019-09-09 20:50:49 +080031 "networkstack-aidl-interfaces-java",
markchien77c17be62019-09-25 14:33:39 +080032 "android.hardware.tetheroffload.control-V1.0-java",
markchien017fef22019-08-27 10:19:38 +080033 "tethering-client",
34 ],
35 manifest: "AndroidManifestBase.xml",
36}
37
38// Build tethering static library, used to compile both variants of the tethering.
39android_library {
40 name: "TetheringApiCurrentLib",
41 defaults: ["TetheringAndroidLibraryDefaults"],
42}
43
markchien77c17be62019-09-25 14:33:39 +080044cc_library_shared {
45 name: "libtetheroffloadjni",
46 srcs: [
47 "jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp",
48 ],
49 shared_libs: [
50 "libnativehelper",
51 "libcutils",
52 "android.hardware.tetheroffload.config@1.0",
53 ],
54 static_libs: [
55 "liblog",
56 "libbase",
57 "libhidlbase",
58 "libutils",
59 ],
60
61 cflags: [
62 "-Wall",
63 "-Werror",
64 "-Wno-unused-parameter",
65 "-Wthread-safety",
66 ],
67}
68
markchien017fef22019-08-27 10:19:38 +080069// Common defaults for compiling the actual APK.
70java_defaults {
71 name: "TetheringAppDefaults",
72 platform_apis: true,
73 privileged: true,
markchien77c17be62019-09-25 14:33:39 +080074 jni_libs: [
75 "libtetheroffloadjni",
76 ],
markchien017fef22019-08-27 10:19:38 +080077 resource_dirs: [
78 "res",
79 ],
80 optimize: {
81 proguard_flags_files: ["proguard.flags"],
82 },
83}
84
85// Non-updatable tethering running in the system server process for devices not using the module
86// TODO: build in-process tethering APK here.
87
88// Updatable tethering packaged as an application
89android_app {
90 name: "Tethering",
91 defaults: ["TetheringAppDefaults"],
92 static_libs: ["TetheringApiCurrentLib"],
93 certificate: "networkstack",
94 manifest: "AndroidManifest.xml",
95 use_embedded_native_libs: true,
96 // The permission configuration *must* be included to ensure security of the device
97 required: ["NetworkPermissionConfig"],
98}
markchiena6ba54d2019-09-03 15:58:06 +080099
100// This group will be removed when tethering migration is done.
101filegroup {
markchienf303c5a2019-09-23 20:29:54 +0800102 name: "tethering-servicescore-srcs",
markchiena6ba54d2019-09-03 15:58:06 +0800103 srcs: [
markchienf303c5a2019-09-23 20:29:54 +0800104 "src/com/android/server/connectivity/tethering/EntitlementManager.java",
markchien77c17be62019-09-25 14:33:39 +0800105 "src/com/android/server/connectivity/tethering/OffloadController.java",
106 "src/com/android/server/connectivity/tethering/OffloadHardwareInterface.java",
markchiena6ba54d2019-09-03 15:58:06 +0800107 "src/com/android/server/connectivity/tethering/TetheringConfiguration.java",
markchiend020e552019-09-23 21:39:39 +0800108 "src/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java",
markchienf303c5a2019-09-23 20:29:54 +0800109 ],
110}
111
112// This group will be removed when tethering migration is done.
113filegroup {
114 name: "tethering-servicesnet-srcs",
115 srcs: [
markchien08cc0302019-09-09 20:50:49 +0800116 "src/android/net/dhcp/DhcpServerCallbacks.java",
117 "src/android/net/dhcp/DhcpServingParamsParcelExt.java",
118 "src/android/net/ip/IpServer.java",
119 "src/android/net/ip/RouterAdvertisementDaemon.java",
120 "src/android/net/util/InterfaceSet.java",
markchiend020e552019-09-23 21:39:39 +0800121 "src/android/net/util/PrefixUtils.java",
markchiena6ba54d2019-09-03 15:58:06 +0800122 ],
123}
markchien77c17be62019-09-25 14:33:39 +0800124
125// This group would be removed when tethering migration is done.
126filegroup {
127 name: "tethering-jni-srcs",
128 srcs: [
129 "jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp",
130 ],
131}