blob: 5817118bc8619b12cf9aa795662089926dfb14fa [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: [
Niklas Lindgren0c904882018-12-07 11:08:04 +010042 "androidx.annotation_annotation",
Chalard Jean5b678762019-01-30 21:04:58 +090043 "ipmemorystore-client",
Remi NGUYEN VAN6e9fdbd2019-01-29 15:38:52 +090044 "netd_aidl_interface-java",
45 "networkstack-aidl-interfaces-java",
Chiachang Wang8b5f84a2019-02-22 11:13:07 +080046 "datastallprotosnano",
Chiachang Wang54663a82019-03-21 20:40:01 +080047 "networkstackprotosnano",
paulhu5982eff2019-03-29 19:21:30 +080048 "captiveportal-lib",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090049 ],
50 manifest: "AndroidManifestBase.xml",
51}
52
paulhue455e2a2019-03-29 17:22:20 +080053cc_library_shared {
54 name: "libnetworkstackutilsjni",
55 srcs: [
56 "jni/network_stack_utils_jni.cpp"
57 ],
58
59 shared_libs: [
60 "liblog",
61 "libcutils",
62 "libnativehelper",
63 ],
64 static_libs: [
65 "libpcap",
66 ],
67 cflags: [
68 "-Wall",
69 "-Werror",
70 "-Wno-unused-parameter",
71 ],
72}
73
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090074java_defaults {
75 name: "NetworkStackAppCommon",
76 defaults: ["NetworkStackCommon"],
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090077 privileged: true,
78 static_libs: [
79 "NetworkStackBase",
80 ],
paulhue455e2a2019-03-29 17:22:20 +080081 jni_libs: ["libnetworkstackutilsjni"],
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090082 // Resources already included in NetworkStackBase
83 resource_dirs: [],
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090084 jarjar_rules: "jarjar-rules-shared.txt",
Remi NGUYEN VAN776d7f72019-03-26 14:58:08 +090085 optimize: {
86 proguard_flags_files: ["proguard.flags"],
87 },
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090088 // The permission configuration *must* be included to ensure security of the device
Remi NGUYEN VAN288fb702019-03-26 17:24:48 +090089 required: ["NetworkPermissionConfig"],
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090090}
91
92// Non-updatable network stack running in the system server process for devices not using the module
93android_app {
94 name: "InProcessNetworkStack",
95 defaults: ["NetworkStackAppCommon"],
96 certificate: "platform",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090097 manifest: "AndroidManifest_InProcess.xml",
Remi NGUYEN VANded23152018-12-07 16:52:24 +090098}
99
100// Updatable network stack packaged as an application
101android_app {
102 name: "NetworkStack",
Remi NGUYEN VAN40369562019-03-20 16:40:54 +0900103 defaults: ["NetworkStackAppCommon"],
Remi NGUYEN VANd8327a22019-02-15 17:45:03 +0900104 certificate: "networkstack",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +0900105 manifest: "AndroidManifest.xml",
Chiachang Wang8b5f84a2019-02-22 11:13:07 +0800106}