blob: 26fc1459788bef8b66b7fcb7bbba0a4f4004cf81 [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 {
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000018 default_team: "trendy_team_fwk_core_networking",
paulhu802ab972021-12-14 01:30:22 +000019 // See: http://go/android-license-faq
20 default_applicable_licenses: ["Android-Apache-2.0"],
21}
22
Remi NGUYEN VANc41daa42023-08-14 15:34:20 +090023framework_remoteauth_srcs = [":framework-remoteauth-java-sources"]
24framework_remoteauth_api_srcs = []
25
26java_defaults {
27 name: "enable-remoteauth-targets",
28 enabled: true,
29}
30
Remi NGUYEN VANaf582a02022-03-08 19:49:49 +090031// Include build rules from Sources.bp
32build = ["Sources.bp"]
33
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000034java_defaults {
35 name: "enable-framework-connectivity-t-targets",
36 enabled: true,
37}
Aditya Choudhary01b5ede2024-01-31 11:08:57 +000038
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000039// The above defaults can be used to disable framework-connectivity t
40// targets while minimizing merge conflicts in the build rules.
41
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090042// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
43// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
44// framework-connectivity.
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090045java_defaults {
paulhu699477a2022-02-08 21:25:28 +080046 name: "framework-connectivity-t-defaults",
paulhu802ab972021-12-14 01:30:22 +000047 sdk_version: "module_current",
48 min_sdk_version: "Tiramisu",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000049 defaults: [
50 "framework-module-defaults",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000051 ],
paulhu802ab972021-12-14 01:30:22 +000052 srcs: [
53 ":framework-connectivity-tiramisu-updatable-sources",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090054 ":framework-nearby-java-sources",
Kangping Donge7fef892023-08-11 15:30:09 +080055 ":framework-thread-sources",
Igor Zaslavskye3365862023-09-21 09:26:31 +000056 ],
paulhu802ab972021-12-14 01:30:22 +000057 libs: [
58 "unsupportedappusage",
59 "app-compat-annotations",
Xinyi Zhou0d195ae2023-03-22 19:06:54 +000060 "androidx.annotation_annotation",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090061 ],
Junyu Lai2dce8482023-12-05 08:22:43 +000062 static_libs: [
63 // Cannot go to framework-connectivity because mid_sdk checks require 31.
64 "modules-utils-binary-xml",
Motomu Utsumidbb82c02024-08-15 16:56:35 +090065 "com.android.nearby.flags-aconfig-java",
66 "com.android.net.thread.flags-aconfig-java",
Junyu Lai2dce8482023-12-05 08:22:43 +000067 ],
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090068 impl_only_libs: [
69 // The build system will use framework-bluetooth module_current stubs, because
70 // of sdk_version: "module_current" above.
Jihoon Kang8401b6a2024-08-30 00:29:58 +000071 "framework-bluetooth.stubs.module_lib",
72 "framework-wifi.stubs.module_lib",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090073 // Compile against the entire implementation of framework-connectivity,
74 // including hidden methods. This is safe because if framework-connectivity-t is
75 // on the bootclasspath (i.e., T), then framework-connectivity is also on the
76 // bootclasspath (because it shipped in S).
77 //
78 // This compiles against the pre-jarjar target so that this code can use
79 // non-jarjard names of widely-used packages such as com.android.net.module.util.
80 "framework-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +000081 ],
Junyu Lai8d323302022-01-13 06:43:37 +000082 aidl: {
83 generate_get_transaction_name: true,
84 include_dirs: [
85 // For connectivity-framework classes such as Network.aidl,
86 // and connectivity-framework-t classes such as
87 // NetworkStateSnapshot.aidl
88 "packages/modules/Connectivity/framework/aidl-export",
89 ],
90 },
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090091 apex_available: [
92 "com.android.tethering",
93 ],
94}
95
Paul Duffinc8164e42022-07-28 10:52:09 +000096filegroup {
97 name: "connectivity-t-hiddenapi-files",
98 srcs: ["hiddenapi/*.txt"],
99 visibility: ["//packages/modules/Connectivity:__subpackages__"],
100}
101
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900102java_library {
paulhu699477a2022-02-08 21:25:28 +0800103 name: "framework-connectivity-t-pre-jarjar",
104 defaults: ["framework-connectivity-t-defaults"],
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900105 libs: [
Jihoon Kang8401b6a2024-08-30 00:29:58 +0000106 "framework-bluetooth.stubs.module_lib",
107 "framework-wifi.stubs.module_lib",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900108 "framework-connectivity-pre-jarjar",
Yahav Nussbaumc712a572024-01-29 12:23:28 +0000109 "framework-location.stubs.module_lib",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900110 ],
111 visibility: ["//packages/modules/Connectivity:__subpackages__"],
112}
113
114// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
115// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
116// framework-connectivity.
117java_sdk_library {
paulhu699477a2022-02-08 21:25:28 +0800118 name: "framework-connectivity-t",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900119 defaults: [
paulhu699477a2022-02-08 21:25:28 +0800120 "framework-connectivity-t-defaults",
junyulai91e3dc22022-02-09 18:21:56 +0800121 "enable-framework-connectivity-t-targets",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900122 ],
123 // Do not add static_libs to this library: put them in framework-connectivity instead.
124 // The jarjar rules are only so that references to jarjared utils in
125 // framework-connectivity-pre-jarjar match at runtime.
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900126 jarjar_rules: ":framework-connectivity-jarjar-rules",
Remi NGUYEN VAN77d4c4e2022-08-03 15:31:02 +0900127 stub_only_libs: [
Junyu Laid0e04942024-07-10 18:10:05 +0800128 // static_libs is not used to compile stubs. So libs which have
129 // been included in static_libs might still need to
130 // be in stub_only_libs to be usable when generating the API stubs.
131 "com.android.net.flags-aconfig-java",
Motomu Utsumidbb82c02024-08-15 16:56:35 +0900132 "com.android.nearby.flags-aconfig-java",
133 "com.android.net.thread.flags-aconfig-java",
Remi NGUYEN VAN77d4c4e2022-08-03 15:31:02 +0900134 // Use prebuilt framework-connectivity stubs to avoid circular dependencies
135 "sdk_module-lib_current_framework-connectivity",
136 ],
137 libs: [
Yahav Nussbaumc712a572024-01-29 12:23:28 +0000138 "framework-location.stubs.module_lib",
Remi NGUYEN VAN77d4c4e2022-08-03 15:31:02 +0900139 "sdk_module-lib_current_framework-connectivity",
140 ],
paulhu802ab972021-12-14 01:30:22 +0000141 permitted_packages: [
Junyu Lai2ef865e2022-01-17 11:52:57 +0000142 "android.app.usage",
paulhu802ab972021-12-14 01:30:22 +0000143 "android.net",
144 "android.net.nsd",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900145 "android.nearby",
146 "com.android.connectivity",
147 "com.android.nearby",
paulhu802ab972021-12-14 01:30:22 +0000148 ],
Paul Duffinc8164e42022-07-28 10:52:09 +0000149
150 hidden_api: {
151 max_target_o_low_priority: [
152 "hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt",
153 ],
154 max_target_r_low_priority: [
155 "hiddenapi/hiddenapi-max-target-r-loprio.txt",
156 ],
157 unsupported: [
158 "hiddenapi/hiddenapi-unsupported-tiramisu.txt",
159 ],
160 },
161
paulhu802ab972021-12-14 01:30:22 +0000162 impl_library_visibility: [
163 "//packages/modules/Connectivity/Tethering/apex",
164 // In preparation for future move
165 "//packages/modules/Connectivity/apex",
Remi NGUYEN VAN371e7f72022-07-25 18:52:58 +0900166 "//packages/modules/Connectivity/service", // For R8 only
paulhu802ab972021-12-14 01:30:22 +0000167 "//packages/modules/Connectivity/service-t",
Cole Fauste49c11d2023-03-22 14:19:02 -0700168 "//packages/modules/Connectivity/nearby:__subpackages__",
Igor Zaslavskyec344f42023-08-08 04:28:45 +0000169 "//packages/modules/Connectivity/remoteauth:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000170 "//frameworks/base",
171
172 // Tests using hidden APIs
173 "//cts/tests/netlegacy22.api",
Lorenzo Colittieb8d8552022-02-01 13:51:42 +0900174 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest
Yan Yan587f9962024-10-02 22:38:10 +0000175
176 // TODO: b/374174952 Remove it when VCN CTS is moved to Connectivity/
177 "//cts/tests/tests/vcn",
178
paulhu802ab972021-12-14 01:30:22 +0000179 "//external/sl4a:__subpackages__",
Remi NGUYEN VANbdaa3512022-02-02 20:06:56 +0900180 "//frameworks/base/core/tests/bandwidthtests",
181 "//frameworks/base/core/tests/benchmarks",
182 "//frameworks/base/core/tests/utillib",
Chiachang Wanga5d98752024-02-28 07:50:15 +0000183 "//frameworks/base/services/tests/VpnTests",
Aaron Huang7174ac32022-01-26 00:43:10 +0800184 "//frameworks/base/tests/vcn",
Xiao Maeaaf7d32022-01-23 16:14:51 +0000185 "//frameworks/opt/net/ethernet/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000186 "//frameworks/opt/telephony/tests/telephonytests",
187 "//packages/modules/CaptivePortalLogin/tests",
Motomu Utsumic4800392023-09-11 11:48:36 +0900188 "//packages/modules/Connectivity/staticlibs/testutils",
189 "//packages/modules/Connectivity/staticlibs/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000190 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
191 "//packages/modules/Connectivity/tests:__subpackages__",
Handa Wang806f5a12023-12-04 12:53:39 +0800192 "//packages/modules/Connectivity/thread/tests:__subpackages__",
Aaron Huangb5af0fe2022-02-11 13:52:29 +0800193 "//packages/modules/IPsec/tests/iketests",
paulhu802ab972021-12-14 01:30:22 +0000194 "//packages/modules/NetworkStack/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000195 "//packages/modules/Wifi/service/tests/wifitests",
196 ],
Jihoon Kang49bbfc92024-01-25 02:17:28 +0000197 aconfig_declarations: [
198 "com.android.net.flags-aconfig",
Kangping Dong8fb80dd2024-02-22 10:59:36 +0800199 "com.android.net.thread.flags-aconfig",
Yahav Nussbaum259be7b2024-02-22 06:22:31 +0000200 "nearby_flags",
Jihoon Kang49bbfc92024-01-25 02:17:28 +0000201 ],
MÃ¥rten Kongstad4ece7372024-06-20 09:05:51 +0200202 lint: {
203 baseline_filename: "lint-baseline.xml",
204 },
paulhu802ab972021-12-14 01:30:22 +0000205}
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900206
Yuyang Huang90a2cbd2023-02-09 16:29:16 +0900207// This rule is not used anymore(b/268440216).
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900208platform_compat_config {
209 name: "connectivity-t-platform-compat-config",
210 src: ":framework-connectivity-t",
211}