blob: ea73b5f1ce7fd5b72a13dc411e7c32deb604d9f6 [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 VAN0395b702022-03-08 19:49:49 +090022// Include build rules from Sources.bp
23build = ["Sources.bp"]
24
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000025java_defaults {
26 name: "enable-framework-connectivity-t-targets",
27 enabled: true,
28}
29// The above defaults can be used to disable framework-connectivity t
30// targets while minimizing merge conflicts in the build rules.
31
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090032// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
33// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
34// framework-connectivity.
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090035java_defaults {
paulhu537f7202022-02-08 21:25:28 +080036 name: "framework-connectivity-t-defaults",
paulhu802ab972021-12-14 01:30:22 +000037 sdk_version: "module_current",
38 min_sdk_version: "Tiramisu",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000039 defaults: [
40 "framework-module-defaults",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000041 ],
paulhu802ab972021-12-14 01:30:22 +000042 srcs: [
43 ":framework-connectivity-tiramisu-updatable-sources",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090044 ":framework-nearby-java-sources",
45 ],
paulhu802ab972021-12-14 01:30:22 +000046 libs: [
47 "unsupportedappusage",
48 "app-compat-annotations",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090049 ],
50 impl_only_libs: [
51 // The build system will use framework-bluetooth module_current stubs, because
52 // of sdk_version: "module_current" above.
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090053 "framework-bluetooth",
Junyu Laieb6f4be2022-01-17 11:52:57 +000054 "framework-wifi",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090055 // Compile against the entire implementation of framework-connectivity,
56 // including hidden methods. This is safe because if framework-connectivity-t is
57 // on the bootclasspath (i.e., T), then framework-connectivity is also on the
58 // bootclasspath (because it shipped in S).
59 //
60 // This compiles against the pre-jarjar target so that this code can use
61 // non-jarjard names of widely-used packages such as com.android.net.module.util.
62 "framework-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +000063 ],
Junyu Laidc0d5212022-01-13 06:43:37 +000064 aidl: {
65 generate_get_transaction_name: true,
66 include_dirs: [
67 // For connectivity-framework classes such as Network.aidl,
68 // and connectivity-framework-t classes such as
69 // NetworkStateSnapshot.aidl
70 "packages/modules/Connectivity/framework/aidl-export",
71 ],
72 },
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090073 apex_available: [
74 "com.android.tethering",
75 ],
76}
77
78java_library {
paulhu537f7202022-02-08 21:25:28 +080079 name: "framework-connectivity-t-pre-jarjar",
80 defaults: ["framework-connectivity-t-defaults"],
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090081 libs: [
82 "framework-bluetooth",
Junyu Laieb6f4be2022-01-17 11:52:57 +000083 "framework-wifi",
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090084 "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 {
paulhu537f7202022-02-08 21:25:28 +080093 name: "framework-connectivity-t",
Remi NGUYEN VAN2ba9dbe2022-02-01 23:07:33 +090094 defaults: [
paulhu537f7202022-02-08 21:25:28 +080095 "framework-connectivity-t-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.
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900101 jarjar_rules: ":framework-connectivity-jarjar-rules",
Remi NGUYEN VAN77d4c4e2022-08-03 15:31:02 +0900102 stub_only_libs: [
103 // Use prebuilt framework-connectivity stubs to avoid circular dependencies
104 "sdk_module-lib_current_framework-connectivity",
105 ],
106 libs: [
107 "sdk_module-lib_current_framework-connectivity",
108 ],
paulhu802ab972021-12-14 01:30:22 +0000109 permitted_packages: [
Junyu Laieb6f4be2022-01-17 11:52:57 +0000110 "android.app.usage",
paulhu802ab972021-12-14 01:30:22 +0000111 "android.net",
112 "android.net.nsd",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900113 "android.nearby",
114 "com.android.connectivity",
115 "com.android.nearby",
paulhu802ab972021-12-14 01:30:22 +0000116 ],
paulhu802ab972021-12-14 01:30:22 +0000117 impl_library_visibility: [
118 "//packages/modules/Connectivity/Tethering/apex",
119 // In preparation for future move
120 "//packages/modules/Connectivity/apex",
Remi NGUYEN VAN371e7f72022-07-25 18:52:58 +0900121 "//packages/modules/Connectivity/service", // For R8 only
paulhu802ab972021-12-14 01:30:22 +0000122 "//packages/modules/Connectivity/service-t",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900123 "//packages/modules/Nearby/service",
paulhu802ab972021-12-14 01:30:22 +0000124 "//frameworks/base",
125
126 // Tests using hidden APIs
127 "//cts/tests/netlegacy22.api",
Lorenzo Colittieb8d8552022-02-01 13:51:42 +0900128 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest
paulhu802ab972021-12-14 01:30:22 +0000129 "//external/sl4a:__subpackages__",
Remi NGUYEN VAN85a4e072022-02-02 20:06:56 +0900130 "//frameworks/base/core/tests/bandwidthtests",
131 "//frameworks/base/core/tests/benchmarks",
132 "//frameworks/base/core/tests/utillib",
Aaron Huang720ad7c2022-01-26 00:43:10 +0800133 "//frameworks/base/tests/vcn",
paulhu802ab972021-12-14 01:30:22 +0000134 "//frameworks/libs/net/common/testutils",
135 "//frameworks/libs/net/common/tests:__subpackages__",
Xiao Ma0a171c02022-01-23 16:14:51 +0000136 "//frameworks/opt/net/ethernet/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000137 "//frameworks/opt/telephony/tests/telephonytests",
138 "//packages/modules/CaptivePortalLogin/tests",
139 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
140 "//packages/modules/Connectivity/tests:__subpackages__",
Aaron Huangb5af0fe2022-02-11 13:52:29 +0800141 "//packages/modules/IPsec/tests/iketests",
paulhu802ab972021-12-14 01:30:22 +0000142 "//packages/modules/NetworkStack/tests:__subpackages__",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900143 "//packages/modules/Nearby/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000144 "//packages/modules/Wifi/service/tests/wifitests",
145 ],
146}