blob: 262e6f633917a11ea497c5948494062d5c76bcf1 [file] [log] [blame]
Remi NGUYEN VANded23152018-12-07 16:52:24 +09001//
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
paulhu5982eff2019-03-29 19:21:30 +080017java_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 VAN40369562019-03-20 16:40:54 +090026java_defaults {
27 name: "NetworkStackCommon",
28 sdk_version: "system_current",
29 min_sdk_version: "28",
30}
31
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090032// Library including the network stack, used to compile both variants of the network stack
33android_library {
34 name: "NetworkStackBase",
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090035 defaults: ["NetworkStackCommon"],
Remi NGUYEN VANded23152018-12-07 16:52:24 +090036 srcs: [
37 "src/**/*.java",
Remi NGUYEN VAN82b4b422019-01-20 09:35:10 +090038 ":framework-networkstack-shared-srcs",
Remi NGUYEN VAN5daa3702018-12-27 16:43:56 +090039 ":services-networkstack-shared-srcs",
Remi NGUYEN VANded23152018-12-07 16:52:24 +090040 ],
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +090041 static_libs: [
Chalard Jean5b678762019-01-30 21:04:58 +090042 "ipmemorystore-client",
Remi NGUYEN VAN6e9fdbd2019-01-29 15:38:52 +090043 "netd_aidl_interface-java",
44 "networkstack-aidl-interfaces-java",
Chiachang Wang8b5f84a2019-02-22 11:13:07 +080045 "datastallprotosnano",
Chiachang Wang54663a82019-03-21 20:40:01 +080046 "networkstackprotosnano",
paulhu5982eff2019-03-29 19:21:30 +080047 "captiveportal-lib",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090048 ],
49 manifest: "AndroidManifestBase.xml",
50}
51
paulhue455e2a2019-03-29 17:22:20 +080052cc_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 VAN40369562019-03-20 16:40:54 +090073java_defaults {
74 name: "NetworkStackAppCommon",
75 defaults: ["NetworkStackCommon"],
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090076 privileged: true,
77 static_libs: [
78 "NetworkStackBase",
79 ],
paulhue455e2a2019-03-29 17:22:20 +080080 jni_libs: ["libnetworkstackutilsjni"],
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090081 // Resources already included in NetworkStackBase
82 resource_dirs: [],
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090083 jarjar_rules: "jarjar-rules-shared.txt",
Remi NGUYEN VAN776d7f72019-03-26 14:58:08 +090084 optimize: {
85 proguard_flags_files: ["proguard.flags"],
86 },
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090087 // The permission configuration *must* be included to ensure security of the device
Remi NGUYEN VAN288fb702019-03-26 17:24:48 +090088 required: ["NetworkPermissionConfig"],
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090089}
90
91// Non-updatable network stack running in the system server process for devices not using the module
92android_app {
93 name: "InProcessNetworkStack",
94 defaults: ["NetworkStackAppCommon"],
95 certificate: "platform",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090096 manifest: "AndroidManifest_InProcess.xml",
Remi NGUYEN VANded23152018-12-07 16:52:24 +090097}
98
99// Updatable network stack packaged as an application
100android_app {
101 name: "NetworkStack",
Remi NGUYEN VAN40369562019-03-20 16:40:54 +0900102 defaults: ["NetworkStackAppCommon"],
Remi NGUYEN VANd8327a22019-02-15 17:45:03 +0900103 certificate: "networkstack",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +0900104 manifest: "AndroidManifest.xml",
Chiachang Wang8b5f84a2019-02-22 11:13:07 +0800105}