blob: 998572fc56799bd2581cbf878b29183e106cd8e0 [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",
23 ":services-tethering-shared-srcs",
markchienf303c5a2019-09-23 20:29:54 +080024 ":servicescore-tethering-src",
markchien017fef22019-08-27 10:19:38 +080025 ],
26 static_libs: [
27 "androidx.annotation_annotation",
markchien08cc0302019-09-09 20:50:49 +080028 "netd_aidl_interface-java",
29 "networkstack-aidl-interfaces-java",
markchien017fef22019-08-27 10:19:38 +080030 "tethering-client",
31 ],
32 manifest: "AndroidManifestBase.xml",
33}
34
35// Build tethering static library, used to compile both variants of the tethering.
36android_library {
37 name: "TetheringApiCurrentLib",
38 defaults: ["TetheringAndroidLibraryDefaults"],
39}
40
41// Common defaults for compiling the actual APK.
42java_defaults {
43 name: "TetheringAppDefaults",
44 platform_apis: true,
45 privileged: true,
46 resource_dirs: [
47 "res",
48 ],
49 optimize: {
50 proguard_flags_files: ["proguard.flags"],
51 },
52}
53
54// Non-updatable tethering running in the system server process for devices not using the module
55// TODO: build in-process tethering APK here.
56
57// Updatable tethering packaged as an application
58android_app {
59 name: "Tethering",
60 defaults: ["TetheringAppDefaults"],
61 static_libs: ["TetheringApiCurrentLib"],
62 certificate: "networkstack",
63 manifest: "AndroidManifest.xml",
64 use_embedded_native_libs: true,
65 // The permission configuration *must* be included to ensure security of the device
66 required: ["NetworkPermissionConfig"],
67}
markchiena6ba54d2019-09-03 15:58:06 +080068
69// This group will be removed when tethering migration is done.
70filegroup {
markchienf303c5a2019-09-23 20:29:54 +080071 name: "tethering-servicescore-srcs",
markchiena6ba54d2019-09-03 15:58:06 +080072 srcs: [
markchienf303c5a2019-09-23 20:29:54 +080073 "src/com/android/server/connectivity/tethering/EntitlementManager.java",
markchiena6ba54d2019-09-03 15:58:06 +080074 "src/com/android/server/connectivity/tethering/TetheringConfiguration.java",
markchiend020e552019-09-23 21:39:39 +080075 "src/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java",
markchienf303c5a2019-09-23 20:29:54 +080076 ],
77}
78
79// This group will be removed when tethering migration is done.
80filegroup {
81 name: "tethering-servicesnet-srcs",
82 srcs: [
markchien08cc0302019-09-09 20:50:49 +080083 "src/android/net/dhcp/DhcpServerCallbacks.java",
84 "src/android/net/dhcp/DhcpServingParamsParcelExt.java",
85 "src/android/net/ip/IpServer.java",
86 "src/android/net/ip/RouterAdvertisementDaemon.java",
87 "src/android/net/util/InterfaceSet.java",
markchiend020e552019-09-23 21:39:39 +080088 "src/android/net/util/PrefixUtils.java",
markchiena6ba54d2019-09-03 15:58:06 +080089 ],
90}