blob: ca69c187089dfa20c7cc15efe607728c1276f537 [file] [log] [blame]
markchien932da862019-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",
markchien43e97e02019-09-03 15:58:06 +080022 ":framework-tethering-shared-srcs",
23 ":services-tethering-shared-srcs",
markchien932da862019-08-27 10:19:38 +080024 ],
25 static_libs: [
26 "androidx.annotation_annotation",
markchien74a4fa92019-09-09 20:50:49 +080027 "netd_aidl_interface-java",
28 "networkstack-aidl-interfaces-java",
markchien932da862019-08-27 10:19:38 +080029 "tethering-client",
30 ],
31 manifest: "AndroidManifestBase.xml",
32}
33
34// Build tethering static library, used to compile both variants of the tethering.
35android_library {
36 name: "TetheringApiCurrentLib",
37 defaults: ["TetheringAndroidLibraryDefaults"],
38}
39
40// Common defaults for compiling the actual APK.
41java_defaults {
42 name: "TetheringAppDefaults",
43 platform_apis: true,
44 privileged: true,
45 resource_dirs: [
46 "res",
47 ],
48 optimize: {
49 proguard_flags_files: ["proguard.flags"],
50 },
51}
52
53// Non-updatable tethering running in the system server process for devices not using the module
54// TODO: build in-process tethering APK here.
55
56// Updatable tethering packaged as an application
57android_app {
58 name: "Tethering",
59 defaults: ["TetheringAppDefaults"],
60 static_libs: ["TetheringApiCurrentLib"],
61 certificate: "networkstack",
62 manifest: "AndroidManifest.xml",
63 use_embedded_native_libs: true,
64 // The permission configuration *must* be included to ensure security of the device
65 required: ["NetworkPermissionConfig"],
66}
markchien43e97e02019-09-03 15:58:06 +080067
68// This group will be removed when tethering migration is done.
69filegroup {
70 name: "tethering-services-srcs",
71 srcs: [
72 "src/com/android/server/connectivity/tethering/TetheringConfiguration.java",
markchien74a4fa92019-09-09 20:50:49 +080073 "src/android/net/dhcp/DhcpServerCallbacks.java",
74 "src/android/net/dhcp/DhcpServingParamsParcelExt.java",
75 "src/android/net/ip/IpServer.java",
76 "src/android/net/ip/RouterAdvertisementDaemon.java",
77 "src/android/net/util/InterfaceSet.java",
markchien43e97e02019-09-03 15:58:06 +080078 ],
79}