blob: 3c36f8738973ab8e56d2395643e7801fa403495c [file] [log] [blame]
paulhu49ccb6a2021-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 VAN955c33c2021-12-16 15:10:40 +000022java_defaults {
23 name: "enable-framework-connectivity-t-targets",
Remi NGUYEN VAN22ea8772021-12-16 15:17:28 +000024 enabled: false,
Remi NGUYEN VAN955c33c2021-12-16 15:10:40 +000025}
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.
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090032java_defaults {
33 name: "framework-connectivity-tiramisu-defaults",
paulhu49ccb6a2021-12-14 01:30:22 +000034 sdk_version: "module_current",
35 min_sdk_version: "Tiramisu",
Remi NGUYEN VAN955c33c2021-12-16 15:10:40 +000036 defaults: [
37 "framework-module-defaults",
Remi NGUYEN VAN955c33c2021-12-16 15:10:40 +000038 ],
paulhu49ccb6a2021-12-14 01:30:22 +000039 srcs: [
40 ":framework-connectivity-tiramisu-updatable-sources",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090041 ":framework-nearby-java-sources",
42 ],
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090043 stub_only_libs: [
44 // Use prebuilt framework-connectivity stubs to avoid circular dependencies
45 "sdk_module-lib_current_framework-connectivity",
paulhu49ccb6a2021-12-14 01:30:22 +000046 ],
47 libs: [
48 "unsupportedappusage",
49 "app-compat-annotations",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090050 "sdk_module-lib_current_framework-connectivity",
51 ],
52 impl_only_libs: [
53 // The build system will use framework-bluetooth module_current stubs, because
54 // of sdk_version: "module_current" above.
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090055 "framework-bluetooth",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090056 // Compile against the entire implementation of framework-connectivity,
57 // including hidden methods. This is safe because if framework-connectivity-t is
58 // on the bootclasspath (i.e., T), then framework-connectivity is also on the
59 // bootclasspath (because it shipped in S).
60 //
61 // This compiles against the pre-jarjar target so that this code can use
62 // non-jarjard names of widely-used packages such as com.android.net.module.util.
63 "framework-connectivity-pre-jarjar",
paulhu49ccb6a2021-12-14 01:30:22 +000064 ],
Junyu Laid6a6a4e2022-01-13 06:43:37 +000065 aidl: {
66 generate_get_transaction_name: true,
67 include_dirs: [
68 // For connectivity-framework classes such as Network.aidl,
69 // and connectivity-framework-t classes such as
70 // NetworkStateSnapshot.aidl
71 "packages/modules/Connectivity/framework/aidl-export",
72 ],
73 },
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090074 apex_available: [
75 "com.android.tethering",
76 ],
77}
78
79java_library {
80 name: "framework-connectivity-tiramisu-pre-jarjar",
81 defaults: ["framework-connectivity-tiramisu-defaults"],
82 libs: [
83 "framework-bluetooth",
84 "framework-connectivity-pre-jarjar",
85 ],
86 visibility: ["//packages/modules/Connectivity:__subpackages__"],
87}
88
89// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
90// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
91// framework-connectivity.
92java_sdk_library {
93 name: "framework-connectivity-tiramisu",
94 defaults: [
95 "framework-connectivity-tiramisu-defaults",
junyulai91e3dc22022-02-09 18:21:56 +080096 "enable-framework-connectivity-t-targets",
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090097 ],
98 // Do not add static_libs to this library: put them in framework-connectivity instead.
99 // The jarjar rules are only so that references to jarjared utils in
100 // framework-connectivity-pre-jarjar match at runtime.
101 jarjar_rules: ":connectivity-jarjar-rules",
paulhu49ccb6a2021-12-14 01:30:22 +0000102 permitted_packages: [
103 "android.net",
104 "android.net.nsd",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900105 "android.nearby",
106 "com.android.connectivity",
107 "com.android.nearby",
paulhu49ccb6a2021-12-14 01:30:22 +0000108 ],
paulhu49ccb6a2021-12-14 01:30:22 +0000109 impl_library_visibility: [
110 "//packages/modules/Connectivity/Tethering/apex",
111 // In preparation for future move
112 "//packages/modules/Connectivity/apex",
113 "//packages/modules/Connectivity/service-t",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900114 "//packages/modules/Nearby/service",
paulhu49ccb6a2021-12-14 01:30:22 +0000115 "//frameworks/base",
116
117 // Tests using hidden APIs
118 "//cts/tests/netlegacy22.api",
Lorenzo Colittieb8d8552022-02-01 13:51:42 +0900119 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest
paulhu49ccb6a2021-12-14 01:30:22 +0000120 "//external/sl4a:__subpackages__",
Remi NGUYEN VAN85a4e072022-02-02 20:06:56 +0900121 "//frameworks/base/core/tests/bandwidthtests",
122 "//frameworks/base/core/tests/benchmarks",
123 "//frameworks/base/core/tests/utillib",
Aaron Huang720ad7c2022-01-26 00:43:10 +0800124 "//frameworks/base/tests/vcn",
paulhu49ccb6a2021-12-14 01:30:22 +0000125 "//frameworks/libs/net/common/testutils",
126 "//frameworks/libs/net/common/tests:__subpackages__",
127 "//frameworks/opt/telephony/tests/telephonytests",
128 "//packages/modules/CaptivePortalLogin/tests",
129 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
130 "//packages/modules/Connectivity/tests:__subpackages__",
Aaron Huangb5af0fe2022-02-11 13:52:29 +0800131 "//packages/modules/IPsec/tests/iketests",
paulhu49ccb6a2021-12-14 01:30:22 +0000132 "//packages/modules/NetworkStack/tests:__subpackages__",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900133 "//packages/modules/Nearby/tests:__subpackages__",
paulhu49ccb6a2021-12-14 01:30:22 +0000134 "//packages/modules/Wifi/service/tests/wifitests",
135 ],
136}