blob: beba1e8e291dcc4e77d2aa6f5fba1bdc5c656915 [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 VANc41daa42023-08-14 15:34:20 +090022framework_remoteauth_srcs = [":framework-remoteauth-java-sources"]
23framework_remoteauth_api_srcs = []
24
25java_defaults {
26 name: "enable-remoteauth-targets",
27 enabled: true,
28}
29
Remi NGUYEN VANaf582a02022-03-08 19:49:49 +090030// Include build rules from Sources.bp
31build = ["Sources.bp"]
32
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000033java_defaults {
34 name: "enable-framework-connectivity-t-targets",
35 enabled: true,
36}
Yahav Nussbaumc712a572024-01-29 12:23:28 +000037
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000038// The above defaults can be used to disable framework-connectivity t
39// targets while minimizing merge conflicts in the build rules.
40
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090041// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
42// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
43// framework-connectivity.
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090044java_defaults {
paulhu699477a2022-02-08 21:25:28 +080045 name: "framework-connectivity-t-defaults",
paulhu802ab972021-12-14 01:30:22 +000046 sdk_version: "module_current",
47 min_sdk_version: "Tiramisu",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000048 defaults: [
49 "framework-module-defaults",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000050 ],
paulhu802ab972021-12-14 01:30:22 +000051 srcs: [
52 ":framework-connectivity-tiramisu-updatable-sources",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090053 ":framework-nearby-java-sources",
Kangping Donge7fef892023-08-11 15:30:09 +080054 ":framework-thread-sources",
Igor Zaslavskye3365862023-09-21 09:26:31 +000055 ],
paulhu802ab972021-12-14 01:30:22 +000056 libs: [
57 "unsupportedappusage",
58 "app-compat-annotations",
Xinyi Zhou0d195ae2023-03-22 19:06:54 +000059 "androidx.annotation_annotation",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090060 ],
Junyu Lai2dce8482023-12-05 08:22:43 +000061 static_libs: [
62 // Cannot go to framework-connectivity because mid_sdk checks require 31.
63 "modules-utils-binary-xml",
64 ],
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090065 impl_only_libs: [
66 // The build system will use framework-bluetooth module_current stubs, because
67 // of sdk_version: "module_current" above.
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090068 "framework-bluetooth",
Junyu Lai2ef865e2022-01-17 11:52:57 +000069 "framework-wifi",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090070 // Compile against the entire implementation of framework-connectivity,
71 // including hidden methods. This is safe because if framework-connectivity-t is
72 // on the bootclasspath (i.e., T), then framework-connectivity is also on the
73 // bootclasspath (because it shipped in S).
74 //
75 // This compiles against the pre-jarjar target so that this code can use
76 // non-jarjard names of widely-used packages such as com.android.net.module.util.
77 "framework-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +000078 ],
Junyu Lai8d323302022-01-13 06:43:37 +000079 aidl: {
80 generate_get_transaction_name: true,
81 include_dirs: [
82 // For connectivity-framework classes such as Network.aidl,
83 // and connectivity-framework-t classes such as
84 // NetworkStateSnapshot.aidl
85 "packages/modules/Connectivity/framework/aidl-export",
86 ],
87 },
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090088 apex_available: [
89 "com.android.tethering",
90 ],
91}
92
Paul Duffinc8164e42022-07-28 10:52:09 +000093filegroup {
94 name: "connectivity-t-hiddenapi-files",
95 srcs: ["hiddenapi/*.txt"],
96 visibility: ["//packages/modules/Connectivity:__subpackages__"],
97}
98
Yuyang Huang33fa4d22023-02-14 22:59:37 +090099// The filegroup lists files that are necessary for verifying building mdns as a standalone,
100// for use with service-connectivity-mdns-standalone-build-test
Yuyang Huangcf25a8a2023-09-08 14:51:08 +0900101// This filegroup should never be included in anywhere in the module build. It is only used for
102// building service-connectivity-mdns-standalone-build-test target. The files will be renamed by
103// copybara to prevent them from being shadowed by the bootclasspath copies.
Yuyang Huang33fa4d22023-02-14 22:59:37 +0900104filegroup {
105 name: "framework-connectivity-t-mdns-standalone-build-sources",
106 srcs: [
107 "src/android/net/nsd/OffloadEngine.java",
108 "src/android/net/nsd/OffloadServiceInfo.java",
109 ],
110 visibility: ["//packages/modules/Connectivity:__subpackages__"],
111}
112
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900113java_library {
paulhu699477a2022-02-08 21:25:28 +0800114 name: "framework-connectivity-t-pre-jarjar",
115 defaults: ["framework-connectivity-t-defaults"],
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900116 libs: [
117 "framework-bluetooth",
Junyu Lai2ef865e2022-01-17 11:52:57 +0000118 "framework-wifi",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900119 "framework-connectivity-pre-jarjar",
Yahav Nussbaumc712a572024-01-29 12:23:28 +0000120 "framework-location.stubs.module_lib",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900121 ],
122 visibility: ["//packages/modules/Connectivity:__subpackages__"],
123}
124
125// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
126// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
127// framework-connectivity.
128java_sdk_library {
paulhu699477a2022-02-08 21:25:28 +0800129 name: "framework-connectivity-t",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900130 defaults: [
paulhu699477a2022-02-08 21:25:28 +0800131 "framework-connectivity-t-defaults",
junyulai91e3dc22022-02-09 18:21:56 +0800132 "enable-framework-connectivity-t-targets",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900133 ],
134 // Do not add static_libs to this library: put them in framework-connectivity instead.
135 // The jarjar rules are only so that references to jarjared utils in
136 // framework-connectivity-pre-jarjar match at runtime.
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900137 jarjar_rules: ":framework-connectivity-jarjar-rules",
Remi NGUYEN VAN77d4c4e2022-08-03 15:31:02 +0900138 stub_only_libs: [
139 // Use prebuilt framework-connectivity stubs to avoid circular dependencies
140 "sdk_module-lib_current_framework-connectivity",
141 ],
142 libs: [
Yahav Nussbaumc712a572024-01-29 12:23:28 +0000143 "framework-location.stubs.module_lib",
Remi NGUYEN VAN77d4c4e2022-08-03 15:31:02 +0900144 "sdk_module-lib_current_framework-connectivity",
145 ],
paulhu802ab972021-12-14 01:30:22 +0000146 permitted_packages: [
Junyu Lai2ef865e2022-01-17 11:52:57 +0000147 "android.app.usage",
paulhu802ab972021-12-14 01:30:22 +0000148 "android.net",
149 "android.net.nsd",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900150 "android.nearby",
151 "com.android.connectivity",
152 "com.android.nearby",
paulhu802ab972021-12-14 01:30:22 +0000153 ],
Paul Duffinc8164e42022-07-28 10:52:09 +0000154
155 hidden_api: {
156 max_target_o_low_priority: [
157 "hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt",
158 ],
159 max_target_r_low_priority: [
160 "hiddenapi/hiddenapi-max-target-r-loprio.txt",
161 ],
162 unsupported: [
163 "hiddenapi/hiddenapi-unsupported-tiramisu.txt",
164 ],
165 },
166
paulhu802ab972021-12-14 01:30:22 +0000167 impl_library_visibility: [
168 "//packages/modules/Connectivity/Tethering/apex",
169 // In preparation for future move
170 "//packages/modules/Connectivity/apex",
Remi NGUYEN VAN371e7f72022-07-25 18:52:58 +0900171 "//packages/modules/Connectivity/service", // For R8 only
paulhu802ab972021-12-14 01:30:22 +0000172 "//packages/modules/Connectivity/service-t",
Cole Fauste49c11d2023-03-22 14:19:02 -0700173 "//packages/modules/Connectivity/nearby:__subpackages__",
Igor Zaslavskyec344f42023-08-08 04:28:45 +0000174 "//packages/modules/Connectivity/remoteauth:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000175 "//frameworks/base",
176
177 // Tests using hidden APIs
178 "//cts/tests/netlegacy22.api",
Lorenzo Colittieb8d8552022-02-01 13:51:42 +0900179 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest
paulhu802ab972021-12-14 01:30:22 +0000180 "//external/sl4a:__subpackages__",
Remi NGUYEN VANbdaa3512022-02-02 20:06:56 +0900181 "//frameworks/base/core/tests/bandwidthtests",
182 "//frameworks/base/core/tests/benchmarks",
183 "//frameworks/base/core/tests/utillib",
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 ],
197}
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900198
Yuyang Huang90a2cbd2023-02-09 16:29:16 +0900199// This rule is not used anymore(b/268440216).
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900200platform_compat_config {
201 name: "connectivity-t-platform-compat-config",
202 src: ":framework-connectivity-t",
203}