markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 1 | // |
| 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 | |
| 17 | java_defaults { |
| 18 | name: "TetheringAndroidLibraryDefaults", |
| 19 | platform_apis: true, |
| 20 | srcs: [ |
| 21 | "src/**/*.java", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 22 | ":framework-tethering-shared-srcs", |
| 23 | ":services-tethering-shared-srcs", |
markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 24 | ":servicescore-tethering-src", |
markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 25 | ], |
| 26 | static_libs: [ |
| 27 | "androidx.annotation_annotation", |
markchien | 74a4fa9 | 2019-09-09 20:50:49 +0800 | [diff] [blame] | 28 | "netd_aidl_interface-java", |
| 29 | "networkstack-aidl-interfaces-java", |
markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 30 | "tethering-client", |
| 31 | ], |
| 32 | manifest: "AndroidManifestBase.xml", |
| 33 | } |
| 34 | |
| 35 | // Build tethering static library, used to compile both variants of the tethering. |
| 36 | android_library { |
| 37 | name: "TetheringApiCurrentLib", |
| 38 | defaults: ["TetheringAndroidLibraryDefaults"], |
| 39 | } |
| 40 | |
| 41 | // Common defaults for compiling the actual APK. |
| 42 | java_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 |
| 58 | android_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 | } |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 68 | |
| 69 | // This group will be removed when tethering migration is done. |
| 70 | filegroup { |
markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 71 | name: "tethering-servicescore-srcs", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 72 | srcs: [ |
markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 73 | "src/com/android/server/connectivity/tethering/EntitlementManager.java", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 74 | "src/com/android/server/connectivity/tethering/TetheringConfiguration.java", |
markchien | f11a5da | 2019-09-23 21:39:39 +0800 | [diff] [blame^] | 75 | "src/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java", |
markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 76 | ], |
| 77 | } |
| 78 | |
| 79 | // This group will be removed when tethering migration is done. |
| 80 | filegroup { |
| 81 | name: "tethering-servicesnet-srcs", |
| 82 | srcs: [ |
markchien | 74a4fa9 | 2019-09-09 20:50:49 +0800 | [diff] [blame] | 83 | "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", |
markchien | f11a5da | 2019-09-23 21:39:39 +0800 | [diff] [blame^] | 88 | "src/android/net/util/PrefixUtils.java", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 89 | ], |
| 90 | } |