blob: 76a17179a9a007195de7176ab87bda682495949d [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
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090017// The network stack can be compiled using system_current (non-finalized) SDK, or finalized system_X
18// SDK. There is also a variant that uses system_current SDK and runs in the system process
19// (InProcessNetworkStack). The following structure is used to create the build rules:
20//
21// NetworkStackAndroidLibraryDefaults <-- common defaults for android libs
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +090022// / \
23// +NetworkStackApiStableShims --> / \ <-- +NetworkStackApiCurrentShims
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +090024// +NetworkStackReleaseApiLevel / \ +NetworkStackDevApiLevel
Lorenzo Colittid6709182021-02-22 01:38:39 +090025// +jarjar apishim.api[latest].* / \
26// to apishim.* / \
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +090027// / \
Lorenzo Colittid6709182021-02-22 01:38:39 +090028// / \
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +090029// / \ android libs w/ all code
Lorenzo Colittid6709182021-02-22 01:38:39 +090030// / <- +module src/ -> \ (also used in unit tests)
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +090031// / \ |
32// NetworkStackApiStableLib NetworkStackApiCurrentLib <--*
33// | |
34// | <-- +NetworkStackAppDefaults --> |
35// | (APK build params) |
36// | |
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +090037// | <-- +NetworkStackReleaseApiLevel | <-- +NetworkStackDevApiLevel
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +090038// | |
39// | |
40// NetworkStackApiStable NetworkStack, InProcessNetworkStack, <-- APKs
41// TestNetworkStack
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090042
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090043// Common defaults to define SDK level
Bob Badourdd486972021-02-12 15:05:06 -080044package {
45 default_applicable_licenses: ["Android-Apache-2.0"],
46}
47
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090048java_defaults {
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +090049 name: "NetworkStackDevApiLevel",
Remi NGUYEN VAN5b3ea2f2020-11-24 02:43:44 +000050 min_sdk_version: "29",
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090051 sdk_version: "system_current",
Remi NGUYEN VAN40369562019-03-20 16:40:54 +090052}
53
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090054java_defaults {
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +090055 name: "NetworkStackReleaseApiLevel",
Remi NGUYEN VAN38dc8342020-05-18 18:09:28 +090056 sdk_version: "system_30",
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +090057 min_sdk_version: "29",
Remi NGUYEN VAN67933142020-05-07 18:53:35 +090058 target_sdk_version: "30",
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090059}
60
Lorenzo Colittid6709182021-02-22 01:38:39 +090061// Libraries for the API shims
62java_defaults {
63 name: "NetworkStackShimsDefaults",
64 libs: [
65 "androidx.annotation_annotation",
66 "networkstack-client",
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090067 ],
Chiachang Wangb86f43c2021-04-22 10:00:40 +080068 static_libs : [
69 "modules-utils-build_system"
70 ],
Lorenzo Colitti0ef45d42021-03-04 09:35:46 +090071 apex_available: [
72 "com.android.tethering",
73 "//apex_available:platform", // For InProcessNetworkStack and InProcessTethering
74 ],
Lorenzo Colittid6709182021-02-22 01:38:39 +090075 min_sdk_version: "29",
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090076}
77
Lorenzo Colittid6709182021-02-22 01:38:39 +090078// Common shim code. This includes the shim interface definitions themselves, and things like
79// ShimUtils and UnsupportedApiLevelException. Compiles against system_current because ShimUtils
80// needs access to all Build.VERSION_CODES.*, which by definition are only in the newest SDK.
81// TODO: consider moving ShimUtils into a library (or removing it in favour of SdkLevel) and compile
82// this target against the lowest-supported SDK (currently 29).
83java_library {
84 name: "NetworkStackShimsCommon",
85 defaults: ["NetworkStackShimsDefaults"],
86 srcs: ["apishim/common/**/*.java"],
87 sdk_version: "system_current",
88 visibility: ["//visibility:private"],
89}
90
91// Each level of the shims (29, 30, ...) is its own java_library compiled against the corresponding
92// system_X SDK. this ensures that each shim can only use SDK classes that exist in its SDK level.
93java_library {
94 name: "NetworkStackApi29Shims",
95 defaults: ["NetworkStackShimsDefaults"],
96 srcs: ["apishim/29/**/*.java"],
97 libs: [
98 "NetworkStackShimsCommon",
Remi NGUYEN VAN99645762019-07-11 14:33:15 +090099 ],
Lorenzo Colittid6709182021-02-22 01:38:39 +0900100 sdk_version: "system_29",
101 visibility: ["//visibility:private"],
102}
103
104java_library {
105 name: "NetworkStackApi30Shims",
106 defaults: ["NetworkStackShimsDefaults"],
107 srcs: [
108 "apishim/30/**/*.java",
109 ],
110 libs: [
111 "NetworkStackShimsCommon",
112 "NetworkStackApi29Shims",
113 ],
114 sdk_version: "system_30",
115 visibility: ["//visibility:private"],
Pedro Loureiro633685e2021-02-25 15:32:07 +0000116 lint: {
117 baseline_filename: "lint-baseline-api-30-shims.xml",
118 },
Lorenzo Colittid6709182021-02-22 01:38:39 +0900119}
120
121// Shims for APIs being added to the current development version of Android. These APIs are not
Lorenzo Colitti52f7eb12021-02-24 17:10:56 +0900122// stable and have no defined version number. These could be called 10000, but they use the next
123// integer so if the next SDK release happens to use that integer, we don't need to rename them.
Lorenzo Colittid6709182021-02-22 01:38:39 +0900124java_library {
125 name: "NetworkStackApi31Shims",
126 defaults: ["NetworkStackShimsDefaults"],
127 srcs: [
128 "apishim/31/**/*.java",
129 ],
130 libs: [
131 "NetworkStackShimsCommon",
132 "NetworkStackApi29Shims",
133 "NetworkStackApi30Shims",
Chiachang Wangffe87162021-02-26 17:36:52 +0800134 "framework-connectivity",
Lorenzo Colittid6709182021-02-22 01:38:39 +0900135 ],
Chiachang Wangffe87162021-02-26 17:36:52 +0800136 sdk_version: "module_current",
Lorenzo Colittid6709182021-02-22 01:38:39 +0900137 visibility: ["//visibility:private"],
138}
139
140// API current uses the API current shims directly.
141// The current (in-progress) shims are in the com.android.networkstack.apishim package and are
142// called directly by the networkstack code.
143java_library {
144 name: "NetworkStackApiCurrentShims",
145 defaults: ["NetworkStackShimsDefaults"],
146 static_libs: [
147 "NetworkStackShimsCommon",
148 "NetworkStackApi29Shims",
149 "NetworkStackApi30Shims",
150 "NetworkStackApi31Shims",
151 ],
Chiachang Wangffe87162021-02-26 17:36:52 +0800152 sdk_version: "module_current",
Chiachang Wanga331c3a2021-02-26 18:01:18 +0800153 visibility: [
Lorenzo Colitti0ef45d42021-03-04 09:35:46 +0900154 "//packages/modules/Connectivity/Tethering",
Chiachang Wanga331c3a2021-02-26 18:01:18 +0800155 "//packages/modules/Connectivity/tests/cts/net",
156 ],
Lorenzo Colittid6709182021-02-22 01:38:39 +0900157}
158
159// API stable uses jarjar to rename the latest stable apishim package from
160// com.android.networkstack.apishim.apiXX to com.android.networkstack.apishim, which is called by
161// the networkstack code.
162java_library {
163 name: "NetworkStackApiStableShims",
164 defaults: ["NetworkStackShimsDefaults"],
165 static_libs: [
166 "NetworkStackShimsCommon",
167 "NetworkStackApi29Shims",
168 "NetworkStackApi30Shims",
169 ],
170 jarjar_rules: "apishim/jarjar-rules-compat.txt",
171 sdk_version: "system_30",
Chiachang Wanga331c3a2021-02-26 18:01:18 +0800172 visibility: [
Lorenzo Colitti0ef45d42021-03-04 09:35:46 +0900173 "//packages/modules/Connectivity/Tethering",
Chiachang Wanga331c3a2021-02-26 18:01:18 +0800174 "//packages/modules/Connectivity/tests/cts/net",
175 ],
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900176}
177
178// Common defaults for android libraries containing network stack code, used to compile variants of
179// the network stack in the system process and in the network_stack process
180java_defaults {
181 name: "NetworkStackAndroidLibraryDefaults",
Remi NGUYEN VANded23152018-12-07 16:52:24 +0900182 srcs: [
Remi NGUYEN VAN82b4b422019-01-20 09:35:10 +0900183 ":framework-networkstack-shared-srcs",
Lorenzo Colittid6709182021-02-22 01:38:39 +0900184 ":networkstack-module-utils-srcs",
Remi NGUYEN VANded23152018-12-07 16:52:24 +0900185 ],
Artur Satayev0eb158a2019-12-10 12:54:01 +0000186 libs: ["unsupportedappusage"],
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +0900187 static_libs: [
Niklas Lindgren0c904882018-12-07 11:08:04 +0100188 "androidx.annotation_annotation",
Jeongik Cha848a5b52021-01-26 22:35:03 +0900189 "netd_aidl_interface-lateststable-java",
Remi NGUYEN VAN1fc930c2019-08-09 13:23:47 +0900190 "netlink-client",
Remi NGUYEN VANbbb97032019-08-08 15:53:54 +0900191 "networkstack-client",
Remi NGUYEN VAN5b00d422020-06-08 15:34:22 +0900192 "net-utils-framework-common",
Remi NGUYEN VAN84ba8152020-06-22 18:50:20 +0900193 // See note on statsprotos when adding/updating proto build rules
Chiachang Wang8b5f84a2019-02-22 11:13:07 +0800194 "datastallprotosnano",
lifrcb15db32020-05-21 20:32:36 +0800195 "statsprotos",
paulhu5982eff2019-03-29 19:21:30 +0800196 "captiveportal-lib",
Chalard Jean6f675212020-06-25 23:41:16 +0900197 "net-utils-device-common",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +0900198 ],
Kun Niuf3b69042019-07-01 17:03:20 -0700199 plugins: ["java_api_finder"],
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +0900200}
201
Lorenzo Colittid6709182021-02-22 01:38:39 +0900202// The versions of the android library containing network stack code compiled for each SDK variant.
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900203android_library {
204 name: "NetworkStackApiCurrentLib",
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +0900205 defaults: ["NetworkStackDevApiLevel", "NetworkStackAndroidLibraryDefaults"],
Muhammad Qureshiaa428cc2020-01-29 11:15:16 -0800206 srcs: [
Muhammad Qureshiaa428cc2020-01-29 11:15:16 -0800207 "src/**/*.java",
Muhammad Qureshicd7415e2021-02-11 01:54:48 +0000208 ":statslog-networkstack-java-gen-current"
Muhammad Qureshiaa428cc2020-01-29 11:15:16 -0800209 ],
Lorenzo Colittid6709182021-02-22 01:38:39 +0900210 static_libs: ["NetworkStackApiCurrentShims"],
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +0900211 manifest: "AndroidManifestBase.xml",
Lorenzo Colitti55672ee2021-03-01 16:10:19 +0900212 visibility: [
213 "//frameworks/base/tests/net/integration",
214 "//packages/modules/Connectivity/Tethering/tests/integration",
215 "//packages/modules/Connectivity/tests/cts/net",
216 "//packages/modules/NetworkStack/tests/unit",
217 "//packages/modules/NetworkStack/tests/integration",
218 ],
Pedro Loureiro633685e2021-02-25 15:32:07 +0000219 lint: {
220 baseline_filename: "lint-baseline-current-lib.xml",
221 },
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +0900222}
223
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900224android_library {
225 name: "NetworkStackApiStableLib",
Lorenzo Colittid6709182021-02-22 01:38:39 +0900226 defaults: ["NetworkStackReleaseApiLevel", "NetworkStackAndroidLibraryDefaults"],
Muhammad Qureshiaa428cc2020-01-29 11:15:16 -0800227 srcs: [
228 "src/**/*.java",
Muhammad Qureshicd7415e2021-02-11 01:54:48 +0000229 ":statslog-networkstack-java-gen-stable",
Muhammad Qureshiaa428cc2020-01-29 11:15:16 -0800230 ],
Lorenzo Colittid6709182021-02-22 01:38:39 +0900231 static_libs: ["NetworkStackApiStableShims"],
Remi NGUYEN VAN794a4b52019-09-06 13:00:33 +0900232 manifest: "AndroidManifestBase.xml",
Lorenzo Colitti55672ee2021-03-01 16:10:19 +0900233 visibility: [
Remi NGUYEN VAN170801b2021-05-11 15:09:29 +0000234 "//frameworks/base/packages/Connectivity/tests/integration",
Lorenzo Colitti55672ee2021-03-01 16:10:19 +0900235 "//frameworks/base/tests/net/integration",
236 "//packages/modules/Connectivity/Tethering/tests/integration",
237 "//packages/modules/Connectivity/tests/cts/net",
Remi NGUYEN VAN170801b2021-05-11 15:09:29 +0000238 "//packages/modules/Connectivity/tests/integration",
Lorenzo Colitti55672ee2021-03-01 16:10:19 +0900239 "//packages/modules/NetworkStack/tests/unit",
240 "//packages/modules/NetworkStack/tests/integration",
241 ],
Pedro Loureiro633685e2021-02-25 15:32:07 +0000242 lint: {
243 baseline_filename: "lint-baseline-stable-lib.xml",
244 },
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900245}
246
Lorenzo Colittib891b5e2020-02-05 16:48:09 +0900247filegroup {
248 name: "NetworkStackJarJarRules",
249 srcs: ["jarjar-rules-shared.txt"],
250 visibility: [
251 "//packages/modules/NetworkStack/tests/unit",
252 "//packages/modules/NetworkStack/tests/integration",
Baligh Uddin1151e2e2020-10-29 02:12:29 +0000253 "//packages/modules/Connectivity/Tethering/tests/integration",
Lorenzo Colittib891b5e2020-02-05 16:48:09 +0900254 ]
255}
256
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900257// Common defaults for compiling the actual APK, based on the NetworkStackApiXBase android libraries
258java_defaults {
259 name: "NetworkStackAppDefaults",
260 privileged: true,
261 jni_libs: [
262 "libnativehelper_compat_libc++",
263 "libnetworkstackutilsjni",
264 ],
265 // Resources already included in NetworkStackBase
266 resource_dirs: [],
Lorenzo Colittib891b5e2020-02-05 16:48:09 +0900267 jarjar_rules: ":NetworkStackJarJarRules",
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900268 use_embedded_native_libs: true,
269 optimize: {
270 proguard_flags_files: ["proguard.flags"],
271 },
272}
273
274// Non-updatable network stack running in the system server process for devices not using the module
275android_app {
276 name: "InProcessNetworkStack",
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +0900277 defaults: [ "NetworkStackAppDefaults", "NetworkStackDevApiLevel"],
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900278 static_libs: ["NetworkStackApiCurrentLib"],
279 certificate: "platform",
280 manifest: "AndroidManifest_InProcess.xml",
281 // InProcessNetworkStack is a replacement for NetworkStack
Remi NGUYEN VANec9d8a62019-11-11 03:52:43 +0000282 overrides: ["NetworkStack", "NetworkStackNext"],
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900283 // The permission configuration *must* be included to ensure security of the device
284 // The InProcessNetworkStack goes together with the PlatformCaptivePortalLogin, which replaces
285 // the default CaptivePortalLogin.
286 required: ["PlatformNetworkPermissionConfig", "PlatformCaptivePortalLogin"],
287}
288
Remi NGUYEN VAN255d4912020-02-05 13:42:45 +0900289// Pre-merge the AndroidManifest for NetworkStackNext, so that its manifest can be merged on top
290android_library {
291 name: "NetworkStackNextManifestBase",
292 defaults: ["NetworkStackAppDefaults", "NetworkStackDevApiLevel"],
293 static_libs: ["NetworkStackApiCurrentLib"],
294 manifest: "AndroidManifest.xml"
295}
296
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +0900297// NetworkStack build targeting the current API release, for testing on in-development SDK
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900298android_app {
Remi NGUYEN VANec9d8a62019-11-11 03:52:43 +0000299 name: "NetworkStackNext",
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +0900300 defaults: ["NetworkStackAppDefaults", "NetworkStackDevApiLevel"],
Remi NGUYEN VAN255d4912020-02-05 13:42:45 +0900301 static_libs: ["NetworkStackNextManifestBase"],
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900302 certificate: "networkstack",
Remi NGUYEN VAN255d4912020-02-05 13:42:45 +0900303 manifest: "AndroidManifest_Next.xml",
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900304 // The permission configuration *must* be included to ensure security of the device
305 required: ["NetworkPermissionConfig"],
306}
307
308// Updatable network stack for finalized API
309android_app {
Remi NGUYEN VANec9d8a62019-11-11 03:52:43 +0000310 name: "NetworkStack",
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +0900311 defaults: ["NetworkStackAppDefaults", "NetworkStackReleaseApiLevel"],
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900312 static_libs: ["NetworkStackApiStableLib"],
313 certificate: "networkstack",
314 manifest: "AndroidManifest.xml",
315 // The permission configuration *must* be included to ensure security of the device
316 required: ["NetworkPermissionConfig"],
Artur Satayev862a1a12020-04-09 11:35:52 +0100317 updatable: true,
Remi NGUYEN VAN99645762019-07-11 14:33:15 +0900318}
319
paulhue455e2a2019-03-29 17:22:20 +0800320cc_library_shared {
321 name: "libnetworkstackutilsjni",
322 srcs: [
323 "jni/network_stack_utils_jni.cpp"
324 ],
Jooyung Hand3fb9f52020-04-29 02:43:03 +0900325 sdk_version: "29",
326 min_sdk_version: "29",
paulhue455e2a2019-03-29 17:22:20 +0800327 shared_libs: [
328 "liblog",
Lorenzo Colitti88ddd882019-05-01 11:54:33 +0900329 "libnativehelper_compat_libc++",
paulhue455e2a2019-03-29 17:22:20 +0800330 ],
Orion Hodson94561f62020-12-08 09:56:29 +0000331 static_libs: [
332 "libnetjniutils",
333 ],
Lorenzo Colitti88ddd882019-05-01 11:54:33 +0900334
335 // We cannot use plain "libc++" here to link libc++ dynamically because it results in:
336 // java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found
337 // even if "libc++" is added into jni_libs below. Adding "libc++_shared" into jni_libs doesn't
338 // build because soong complains of:
339 // module NetworkStack missing dependencies: libc++_shared
340 //
341 // So, link libc++ statically. This means that we also need to ensure that all the C++ libraries
342 // we depend on do not dynamically link libc++. This is currently the case, because liblog is
343 // C-only and libnativehelper_compat_libc also uses stl: "c++_static".
344 //
345 // TODO: find a better solution for this in R.
346 stl: "c++_static",
paulhue455e2a2019-03-29 17:22:20 +0800347 cflags: [
348 "-Wall",
349 "-Werror",
350 "-Wno-unused-parameter",
351 ],
352}
353
Chiachang Wang80242272019-04-11 21:24:28 +0800354genrule {
Muhammad Qureshicd7415e2021-02-11 01:54:48 +0000355 name: "statslog-networkstack-java-gen-current",
Chiachang Wang80242272019-04-11 21:24:28 +0800356 tools: ["stats-log-api-gen"],
357 cmd: "$(location stats-log-api-gen) --java $(out) --module network_stack" +
Muhammad Qureshi8e0e9bc2019-12-31 11:26:33 -0800358 " --javaPackage com.android.networkstack.metrics --javaClass NetworkStackStatsLog" +
Muhammad Qureshicd7415e2021-02-11 01:54:48 +0000359 " --minApiLevel 29",
Chiachang Wang80242272019-04-11 21:24:28 +0800360 out: ["com/android/networkstack/metrics/NetworkStackStatsLog.java"],
361}
Kun Niu8e89dd42019-07-16 18:33:45 -0700362
Muhammad Qureshicd7415e2021-02-11 01:54:48 +0000363genrule {
364 name: "statslog-networkstack-java-gen-stable",
365 tools: ["stats-log-api-gen"],
366 cmd: "$(location stats-log-api-gen) --java $(out) --module network_stack" +
367 " --javaPackage com.android.networkstack.metrics --javaClass NetworkStackStatsLog" +
368 " --minApiLevel 29 --compileApiLevel 30",
369 out: ["com/android/networkstack/metrics/NetworkStackStatsLog.java"],
370}
371
372
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +0900373version_code_networkstack_next = "300000000"
374version_code_networkstack_test = "999999999"
375
Kun Niu8e89dd42019-07-16 18:33:45 -0700376genrule {
377 name: "NetworkStackTestAndroidManifest",
378 srcs: ["AndroidManifest.xml"],
379 out: ["TestAndroidManifest.xml"],
Remi NGUYEN VAN16fe4542020-01-16 13:48:38 +0900380 cmd: "sed -E 's/versionCode=\"[0-9]+\"/versionCode=\""
381 + version_code_networkstack_test
382 + "\"/' $(in) > $(out)",
383 visibility: ["//visibility:private"],
384}
385
Kun Niu8e89dd42019-07-16 18:33:45 -0700386android_app {
387 name: "TestNetworkStack",
Remi NGUYEN VAN1d52af02020-12-22 02:08:55 +0000388 defaults: ["NetworkStackAppDefaults", "NetworkStackReleaseApiLevel"],
389 static_libs: ["NetworkStackApiStableLib"],
Kun Niu8e89dd42019-07-16 18:33:45 -0700390 certificate: "networkstack",
391 manifest: ":NetworkStackTestAndroidManifest",
Kun Niu8e89dd42019-07-16 18:33:45 -0700392 // The permission configuration *must* be included to ensure security of the device
393 required: ["NetworkPermissionConfig"],
394}
lifrcb15db32020-05-21 20:32:36 +0800395
Remi NGUYEN VAN84ba8152020-06-22 18:50:20 +0900396// When adding or modifying protos, the jarjar rules and possibly proguard rules need
397// to be updated: proto libraries may pull additional static libraries.
lifrcb15db32020-05-21 20:32:36 +0800398java_library_static {
399 name: "statsprotos",
400 proto: {
401 type: "lite",
402 },
403 srcs: [
404 "src/com/android/networkstack/metrics/stats.proto",
405 ],
406 static_libs: [
407 "networkstackprotos",
408 ],
409 defaults: ["NetworkStackReleaseApiLevel"],
410}