blob: b5aedeb0daf1b468cf5ce9b9381ecc0c85204391 [file] [log] [blame]
paulhu802ab972021-12-14 01:30:22 +00001//
2// Copyright (C) 2021 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
17package {
18 // See: http://go/android-license-faq
19 default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000022java_defaults {
23 name: "enable-framework-connectivity-t-targets",
24 enabled: true,
25}
26// The above defaults can be used to disable framework-connectivity t
27// targets while minimizing merge conflicts in the build rules.
28
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090029// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
30// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
31// framework-connectivity.
paulhu802ab972021-12-14 01:30:22 +000032java_sdk_library {
33 name: "framework-connectivity-tiramisu",
34 sdk_version: "module_current",
35 min_sdk_version: "Tiramisu",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000036 defaults: [
37 "framework-module-defaults",
38 "enable-framework-connectivity-t-targets",
39 ],
paulhu802ab972021-12-14 01:30:22 +000040 srcs: [
41 ":framework-connectivity-tiramisu-updatable-sources",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090042 ":framework-nearby-java-sources",
43 ],
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090044 // Do not add static_libs to this library: put them in framework-connectivity instead.
45 // The jarjar rules are only so that references to jarjared utils in
46 // framework-connectivity-pre-jarjar match at runtime.
47 jarjar_rules: ":connectivity-jarjar-rules",
48 stub_only_libs: [
49 // Use prebuilt framework-connectivity stubs to avoid circular dependencies
50 "sdk_module-lib_current_framework-connectivity",
paulhu802ab972021-12-14 01:30:22 +000051 ],
52 libs: [
53 "unsupportedappusage",
54 "app-compat-annotations",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090055 "sdk_module-lib_current_framework-connectivity",
56 ],
57 impl_only_libs: [
58 // The build system will use framework-bluetooth module_current stubs, because
59 // of sdk_version: "module_current" above.
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090060 "framework-bluetooth",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090061 // Compile against the entire implementation of framework-connectivity,
62 // including hidden methods. This is safe because if framework-connectivity-t is
63 // on the bootclasspath (i.e., T), then framework-connectivity is also on the
64 // bootclasspath (because it shipped in S).
65 //
66 // This compiles against the pre-jarjar target so that this code can use
67 // non-jarjard names of widely-used packages such as com.android.net.module.util.
68 "framework-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +000069 ],
70 permitted_packages: [
71 "android.net",
72 "android.net.nsd",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090073 "android.nearby",
74 "com.android.connectivity",
75 "com.android.nearby",
paulhu802ab972021-12-14 01:30:22 +000076 ],
77 apex_available: [
78 "com.android.tethering",
79 ],
80 impl_library_visibility: [
81 "//packages/modules/Connectivity/Tethering/apex",
82 // In preparation for future move
83 "//packages/modules/Connectivity/apex",
84 "//packages/modules/Connectivity/service-t",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090085 "//packages/modules/Nearby/service",
paulhu802ab972021-12-14 01:30:22 +000086 "//frameworks/base",
87
88 // Tests using hidden APIs
89 "//cts/tests/netlegacy22.api",
Lorenzo Colittieb8d8552022-02-01 13:51:42 +090090 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest
paulhu802ab972021-12-14 01:30:22 +000091 "//external/sl4a:__subpackages__",
92 "//frameworks/libs/net/common/testutils",
93 "//frameworks/libs/net/common/tests:__subpackages__",
94 "//frameworks/opt/telephony/tests/telephonytests",
95 "//packages/modules/CaptivePortalLogin/tests",
96 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
97 "//packages/modules/Connectivity/tests:__subpackages__",
98 "//packages/modules/NetworkStack/tests:__subpackages__",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090099 "//packages/modules/Nearby/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000100 "//packages/modules/Wifi/service/tests/wifitests",
101 ],
102}