Remi NGUYEN VAN | c094a54 | 2018-12-07 16:52:24 +0900 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 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 | |
Remi NGUYEN VAN | 86c4582 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 17 | java_defaults { |
| 18 | name: "NetworkStackCommon", |
| 19 | sdk_version: "system_current", |
| 20 | min_sdk_version: "28", |
| 21 | } |
| 22 | |
Remi NGUYEN VAN | 8acc99a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 23 | // Library including the network stack, used to compile both variants of the network stack |
| 24 | android_library { |
| 25 | name: "NetworkStackBase", |
Remi NGUYEN VAN | 86c4582 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 26 | defaults: ["NetworkStackCommon"], |
Remi NGUYEN VAN | c094a54 | 2018-12-07 16:52:24 +0900 | [diff] [blame] | 27 | srcs: [ |
| 28 | "src/**/*.java", |
Remi NGUYEN VAN | e88516f | 2019-01-20 09:35:10 +0900 | [diff] [blame] | 29 | ":framework-networkstack-shared-srcs", |
Remi NGUYEN VAN | e67b0c3a | 2018-12-27 16:43:56 +0900 | [diff] [blame] | 30 | ":services-networkstack-shared-srcs", |
Remi NGUYEN VAN | c094a54 | 2018-12-07 16:52:24 +0900 | [diff] [blame] | 31 | ], |
Remi NGUYEN VAN | 0e3d0923 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 32 | static_libs: [ |
Chalard Jean | 9521351 | 2019-01-30 21:04:58 +0900 | [diff] [blame] | 33 | "ipmemorystore-client", |
Remi NGUYEN VAN | 231b52b | 2019-01-29 15:38:52 +0900 | [diff] [blame] | 34 | "netd_aidl_interface-java", |
| 35 | "networkstack-aidl-interfaces-java", |
Chiachang Wang | f09e3e3 | 2019-02-22 11:13:07 +0800 | [diff] [blame] | 36 | "datastallprotosnano", |
Chiachang Wang | 4d6fe32 | 2019-03-21 20:40:01 +0800 | [diff] [blame] | 37 | "networkstackprotosnano", |
Remi NGUYEN VAN | 8acc99a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 38 | ], |
| 39 | manifest: "AndroidManifestBase.xml", |
| 40 | } |
| 41 | |
Remi NGUYEN VAN | 86c4582 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 42 | java_defaults { |
| 43 | name: "NetworkStackAppCommon", |
| 44 | defaults: ["NetworkStackCommon"], |
Remi NGUYEN VAN | 8acc99a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 45 | privileged: true, |
| 46 | static_libs: [ |
| 47 | "NetworkStackBase", |
| 48 | ], |
Remi NGUYEN VAN | 86c4582 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 49 | // Resources already included in NetworkStackBase |
| 50 | resource_dirs: [], |
Remi NGUYEN VAN | 8acc99a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 51 | jarjar_rules: "jarjar-rules-shared.txt", |
Remi NGUYEN VAN | aaa7ecfd | 2019-03-26 14:58:08 +0900 | [diff] [blame^] | 52 | optimize: { |
| 53 | proguard_flags_files: ["proguard.flags"], |
| 54 | }, |
Remi NGUYEN VAN | 8acc99a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 55 | // The permission configuration *must* be included to ensure security of the device |
| 56 | required: ["NetworkStackPermissionStub"], |
Remi NGUYEN VAN | 86c4582 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | // Non-updatable network stack running in the system server process for devices not using the module |
| 60 | android_app { |
| 61 | name: "InProcessNetworkStack", |
| 62 | defaults: ["NetworkStackAppCommon"], |
| 63 | certificate: "platform", |
Remi NGUYEN VAN | 8acc99a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 64 | manifest: "AndroidManifest_InProcess.xml", |
Remi NGUYEN VAN | c094a54 | 2018-12-07 16:52:24 +0900 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | // Updatable network stack packaged as an application |
| 68 | android_app { |
| 69 | name: "NetworkStack", |
Remi NGUYEN VAN | 86c4582 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 70 | defaults: ["NetworkStackAppCommon"], |
Remi NGUYEN VAN | ab96bc7 | 2019-02-15 17:45:03 +0900 | [diff] [blame] | 71 | certificate: "networkstack", |
Remi NGUYEN VAN | 8acc99a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 72 | manifest: "AndroidManifest.xml", |
Chiachang Wang | f09e3e3 | 2019-02-22 11:13:07 +0800 | [diff] [blame] | 73 | } |