blob: 9e5ecb439d067b8ef0bd01d868e5933dd9140b41 [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}
37// The above defaults can be used to disable framework-connectivity t
38// targets while minimizing merge conflicts in the build rules.
39
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090040// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
41// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
42// framework-connectivity.
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090043java_defaults {
paulhu699477a2022-02-08 21:25:28 +080044 name: "framework-connectivity-t-defaults",
paulhu802ab972021-12-14 01:30:22 +000045 sdk_version: "module_current",
46 min_sdk_version: "Tiramisu",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000047 defaults: [
48 "framework-module-defaults",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000049 ],
paulhu802ab972021-12-14 01:30:22 +000050 srcs: [
51 ":framework-connectivity-tiramisu-updatable-sources",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090052 ":framework-nearby-java-sources",
Kangping Donge7fef892023-08-11 15:30:09 +080053 ":framework-thread-sources",
Remi NGUYEN VANc41daa42023-08-14 15:34:20 +090054 ] + framework_remoteauth_srcs,
paulhu802ab972021-12-14 01:30:22 +000055 libs: [
56 "unsupportedappusage",
57 "app-compat-annotations",
Xinyi Zhou0d195ae2023-03-22 19:06:54 +000058 "androidx.annotation_annotation",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090059 ],
60 impl_only_libs: [
61 // The build system will use framework-bluetooth module_current stubs, because
62 // of sdk_version: "module_current" above.
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090063 "framework-bluetooth",
Junyu Lai2ef865e2022-01-17 11:52:57 +000064 "framework-wifi",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090065 // Compile against the entire implementation of framework-connectivity,
66 // including hidden methods. This is safe because if framework-connectivity-t is
67 // on the bootclasspath (i.e., T), then framework-connectivity is also on the
68 // bootclasspath (because it shipped in S).
69 //
70 // This compiles against the pre-jarjar target so that this code can use
71 // non-jarjard names of widely-used packages such as com.android.net.module.util.
72 "framework-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +000073 ],
Junyu Lai8d323302022-01-13 06:43:37 +000074 aidl: {
75 generate_get_transaction_name: true,
76 include_dirs: [
77 // For connectivity-framework classes such as Network.aidl,
78 // and connectivity-framework-t classes such as
79 // NetworkStateSnapshot.aidl
80 "packages/modules/Connectivity/framework/aidl-export",
81 ],
82 },
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090083 apex_available: [
84 "com.android.tethering",
85 ],
86}
87
Paul Duffinc8164e42022-07-28 10:52:09 +000088filegroup {
89 name: "connectivity-t-hiddenapi-files",
90 srcs: ["hiddenapi/*.txt"],
91 visibility: ["//packages/modules/Connectivity:__subpackages__"],
92}
93
Yuyang Huang33fa4d22023-02-14 22:59:37 +090094// The filegroup lists files that are necessary for verifying building mdns as a standalone,
95// for use with service-connectivity-mdns-standalone-build-test
Yuyang Huangcf25a8a2023-09-08 14:51:08 +090096// This filegroup should never be included in anywhere in the module build. It is only used for
97// building service-connectivity-mdns-standalone-build-test target. The files will be renamed by
98// copybara to prevent them from being shadowed by the bootclasspath copies.
Yuyang Huang33fa4d22023-02-14 22:59:37 +090099filegroup {
100 name: "framework-connectivity-t-mdns-standalone-build-sources",
101 srcs: [
102 "src/android/net/nsd/OffloadEngine.java",
103 "src/android/net/nsd/OffloadServiceInfo.java",
104 ],
105 visibility: ["//packages/modules/Connectivity:__subpackages__"],
106}
107
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900108java_library {
paulhu699477a2022-02-08 21:25:28 +0800109 name: "framework-connectivity-t-pre-jarjar",
110 defaults: ["framework-connectivity-t-defaults"],
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900111 libs: [
112 "framework-bluetooth",
Junyu Lai2ef865e2022-01-17 11:52:57 +0000113 "framework-wifi",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900114 "framework-connectivity-pre-jarjar",
115 ],
116 visibility: ["//packages/modules/Connectivity:__subpackages__"],
117}
118
119// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
120// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
121// framework-connectivity.
122java_sdk_library {
paulhu699477a2022-02-08 21:25:28 +0800123 name: "framework-connectivity-t",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900124 defaults: [
paulhu699477a2022-02-08 21:25:28 +0800125 "framework-connectivity-t-defaults",
junyulai91e3dc22022-02-09 18:21:56 +0800126 "enable-framework-connectivity-t-targets",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900127 ],
Remi NGUYEN VANc41daa42023-08-14 15:34:20 +0900128 api_srcs: framework_remoteauth_api_srcs,
Remi NGUYEN VAN78585622022-02-01 23:07:33 +0900129 // Do not add static_libs to this library: put them in framework-connectivity instead.
130 // The jarjar rules are only so that references to jarjared utils in
131 // framework-connectivity-pre-jarjar match at runtime.
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900132 jarjar_rules: ":framework-connectivity-jarjar-rules",
Remi NGUYEN VAN77d4c4e2022-08-03 15:31:02 +0900133 stub_only_libs: [
134 // Use prebuilt framework-connectivity stubs to avoid circular dependencies
135 "sdk_module-lib_current_framework-connectivity",
136 ],
137 libs: [
138 "sdk_module-lib_current_framework-connectivity",
139 ],
paulhu802ab972021-12-14 01:30:22 +0000140 permitted_packages: [
Junyu Lai2ef865e2022-01-17 11:52:57 +0000141 "android.app.usage",
paulhu802ab972021-12-14 01:30:22 +0000142 "android.net",
143 "android.net.nsd",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900144 "android.nearby",
Igor Zaslavskyec344f42023-08-08 04:28:45 +0000145 "android.remoteauth",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900146 "com.android.connectivity",
147 "com.android.nearby",
Igor Zaslavskyec344f42023-08-08 04:28:45 +0000148 "com.android.remoteauth",
paulhu802ab972021-12-14 01:30:22 +0000149 ],
Paul Duffinc8164e42022-07-28 10:52:09 +0000150
151 hidden_api: {
152 max_target_o_low_priority: [
153 "hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt",
154 ],
155 max_target_r_low_priority: [
156 "hiddenapi/hiddenapi-max-target-r-loprio.txt",
157 ],
158 unsupported: [
159 "hiddenapi/hiddenapi-unsupported-tiramisu.txt",
160 ],
161 },
162
paulhu802ab972021-12-14 01:30:22 +0000163 impl_library_visibility: [
164 "//packages/modules/Connectivity/Tethering/apex",
165 // In preparation for future move
166 "//packages/modules/Connectivity/apex",
Remi NGUYEN VAN371e7f72022-07-25 18:52:58 +0900167 "//packages/modules/Connectivity/service", // For R8 only
paulhu802ab972021-12-14 01:30:22 +0000168 "//packages/modules/Connectivity/service-t",
Cole Fauste49c11d2023-03-22 14:19:02 -0700169 "//packages/modules/Connectivity/nearby:__subpackages__",
Igor Zaslavskyec344f42023-08-08 04:28:45 +0000170 "//packages/modules/Connectivity/remoteauth:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000171 "//frameworks/base",
172
173 // Tests using hidden APIs
174 "//cts/tests/netlegacy22.api",
Lorenzo Colittieb8d8552022-02-01 13:51:42 +0900175 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest
paulhu802ab972021-12-14 01:30:22 +0000176 "//external/sl4a:__subpackages__",
Remi NGUYEN VANbdaa3512022-02-02 20:06:56 +0900177 "//frameworks/base/core/tests/bandwidthtests",
178 "//frameworks/base/core/tests/benchmarks",
179 "//frameworks/base/core/tests/utillib",
Aaron Huang7174ac32022-01-26 00:43:10 +0800180 "//frameworks/base/tests/vcn",
paulhu802ab972021-12-14 01:30:22 +0000181 "//frameworks/libs/net/common/testutils",
182 "//frameworks/libs/net/common/tests:__subpackages__",
Xiao Maeaaf7d32022-01-23 16:14:51 +0000183 "//frameworks/opt/net/ethernet/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000184 "//frameworks/opt/telephony/tests/telephonytests",
185 "//packages/modules/CaptivePortalLogin/tests",
186 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
187 "//packages/modules/Connectivity/tests:__subpackages__",
Aaron Huangb5af0fe2022-02-11 13:52:29 +0800188 "//packages/modules/IPsec/tests/iketests",
paulhu802ab972021-12-14 01:30:22 +0000189 "//packages/modules/NetworkStack/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000190 "//packages/modules/Wifi/service/tests/wifitests",
191 ],
192}
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900193
Yuyang Huang90a2cbd2023-02-09 16:29:16 +0900194// This rule is not used anymore(b/268440216).
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900195platform_compat_config {
196 name: "connectivity-t-platform-compat-config",
197 src: ":framework-connectivity-t",
198}