| Remi NGUYEN VAN | ded2315 | 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 |  | 
| paulhu | 5982eff | 2019-03-29 19:21:30 +0800 | [diff] [blame] | 17 | java_library { | 
|  | 18 | name: "captiveportal-lib", | 
|  | 19 | srcs: ["common/**/*.java"], | 
|  | 20 | libs: [ | 
|  | 21 | "androidx.annotation_annotation", | 
|  | 22 | ], | 
|  | 23 | sdk_version: "system_current", | 
|  | 24 | } | 
|  | 25 |  | 
| Remi NGUYEN VAN | 4036956 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 26 | java_defaults { | 
|  | 27 | name: "NetworkStackCommon", | 
|  | 28 | sdk_version: "system_current", | 
|  | 29 | min_sdk_version: "28", | 
|  | 30 | } | 
|  | 31 |  | 
| Remi NGUYEN VAN | 0a4df5a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 32 | // Library including the network stack, used to compile both variants of the network stack | 
|  | 33 | android_library { | 
|  | 34 | name: "NetworkStackBase", | 
| Remi NGUYEN VAN | 4036956 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 35 | defaults: ["NetworkStackCommon"], | 
| Remi NGUYEN VAN | ded2315 | 2018-12-07 16:52:24 +0900 | [diff] [blame] | 36 | srcs: [ | 
|  | 37 | "src/**/*.java", | 
| Remi NGUYEN VAN | 82b4b42 | 2019-01-20 09:35:10 +0900 | [diff] [blame] | 38 | ":framework-networkstack-shared-srcs", | 
| Remi NGUYEN VAN | 5daa370 | 2018-12-27 16:43:56 +0900 | [diff] [blame] | 39 | ":services-networkstack-shared-srcs", | 
| Remi NGUYEN VAN | ded2315 | 2018-12-07 16:52:24 +0900 | [diff] [blame] | 40 | ], | 
| Remi NGUYEN VAN | 057bf20 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 41 | static_libs: [ | 
| Chalard Jean | 5b67876 | 2019-01-30 21:04:58 +0900 | [diff] [blame] | 42 | "ipmemorystore-client", | 
| Remi NGUYEN VAN | 6e9fdbd | 2019-01-29 15:38:52 +0900 | [diff] [blame] | 43 | "netd_aidl_interface-java", | 
|  | 44 | "networkstack-aidl-interfaces-java", | 
| Chiachang Wang | 8b5f84a | 2019-02-22 11:13:07 +0800 | [diff] [blame] | 45 | "datastallprotosnano", | 
| Chiachang Wang | 54663a8 | 2019-03-21 20:40:01 +0800 | [diff] [blame] | 46 | "networkstackprotosnano", | 
| paulhu | 5982eff | 2019-03-29 19:21:30 +0800 | [diff] [blame] | 47 | "captiveportal-lib", | 
| Remi NGUYEN VAN | 0a4df5a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 48 | ], | 
|  | 49 | manifest: "AndroidManifestBase.xml", | 
|  | 50 | } | 
|  | 51 |  | 
| paulhu | e455e2a | 2019-03-29 17:22:20 +0800 | [diff] [blame^] | 52 | cc_library_shared { | 
|  | 53 | name: "libnetworkstackutilsjni", | 
|  | 54 | srcs: [ | 
|  | 55 | "jni/network_stack_utils_jni.cpp" | 
|  | 56 | ], | 
|  | 57 |  | 
|  | 58 | shared_libs: [ | 
|  | 59 | "liblog", | 
|  | 60 | "libcutils", | 
|  | 61 | "libnativehelper", | 
|  | 62 | ], | 
|  | 63 | static_libs: [ | 
|  | 64 | "libpcap", | 
|  | 65 | ], | 
|  | 66 | cflags: [ | 
|  | 67 | "-Wall", | 
|  | 68 | "-Werror", | 
|  | 69 | "-Wno-unused-parameter", | 
|  | 70 | ], | 
|  | 71 | } | 
|  | 72 |  | 
| Remi NGUYEN VAN | 4036956 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 73 | java_defaults { | 
|  | 74 | name: "NetworkStackAppCommon", | 
|  | 75 | defaults: ["NetworkStackCommon"], | 
| Remi NGUYEN VAN | 0a4df5a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 76 | privileged: true, | 
|  | 77 | static_libs: [ | 
|  | 78 | "NetworkStackBase", | 
|  | 79 | ], | 
| paulhu | e455e2a | 2019-03-29 17:22:20 +0800 | [diff] [blame^] | 80 | jni_libs: ["libnetworkstackutilsjni"], | 
| Remi NGUYEN VAN | 4036956 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 81 | // Resources already included in NetworkStackBase | 
|  | 82 | resource_dirs: [], | 
| Remi NGUYEN VAN | 0a4df5a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 83 | jarjar_rules: "jarjar-rules-shared.txt", | 
| Remi NGUYEN VAN | 776d7f7 | 2019-03-26 14:58:08 +0900 | [diff] [blame] | 84 | optimize: { | 
|  | 85 | proguard_flags_files: ["proguard.flags"], | 
|  | 86 | }, | 
| Remi NGUYEN VAN | 0a4df5a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 87 | // The permission configuration *must* be included to ensure security of the device | 
| Remi NGUYEN VAN | 288fb70 | 2019-03-26 17:24:48 +0900 | [diff] [blame] | 88 | required: ["NetworkPermissionConfig"], | 
| Remi NGUYEN VAN | 4036956 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 89 | } | 
|  | 90 |  | 
|  | 91 | // Non-updatable network stack running in the system server process for devices not using the module | 
|  | 92 | android_app { | 
|  | 93 | name: "InProcessNetworkStack", | 
|  | 94 | defaults: ["NetworkStackAppCommon"], | 
|  | 95 | certificate: "platform", | 
| Remi NGUYEN VAN | 0a4df5a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 96 | manifest: "AndroidManifest_InProcess.xml", | 
| Remi NGUYEN VAN | ded2315 | 2018-12-07 16:52:24 +0900 | [diff] [blame] | 97 | } | 
|  | 98 |  | 
|  | 99 | // Updatable network stack packaged as an application | 
|  | 100 | android_app { | 
|  | 101 | name: "NetworkStack", | 
| Remi NGUYEN VAN | 4036956 | 2019-03-20 16:40:54 +0900 | [diff] [blame] | 102 | defaults: ["NetworkStackAppCommon"], | 
| Remi NGUYEN VAN | d8327a2 | 2019-02-15 17:45:03 +0900 | [diff] [blame] | 103 | certificate: "networkstack", | 
| Remi NGUYEN VAN | 0a4df5a | 2019-03-08 17:20:49 +0900 | [diff] [blame] | 104 | manifest: "AndroidManifest.xml", | 
| Chiachang Wang | 8b5f84a | 2019-02-22 11:13:07 +0800 | [diff] [blame] | 105 | } |