blob: 9eb81000e7f7d218efb684fc4b893d358a6659ac [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 VAN24b3c372021-12-16 15:10:40 +000022java_defaults {
23 name: "enable-framework-connectivity-t-targets",
24 enabled: true,
25}
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 VAN78585622022-02-01 23:07:33 +090032java_defaults {
33 name: "framework-connectivity-tiramisu-defaults",
paulhu802ab972021-12-14 01:30:22 +000034 sdk_version: "module_current",
35 min_sdk_version: "Tiramisu",
Remi NGUYEN VAN24b3c372021-12-16 15:10:40 +000036 defaults: [
37 "framework-module-defaults",
38 "enable-framework-connectivity-t-targets",
39 ],
paulhu802ab972021-12-14 01:30:22 +000040 srcs: [
41 ":framework-connectivity-tiramisu-updatable-sources",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090042 ":framework-nearby-java-sources",
43 ],
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090044 stub_only_libs: [
45 // Use prebuilt framework-connectivity stubs to avoid circular dependencies
46 "sdk_module-lib_current_framework-connectivity",
paulhu802ab972021-12-14 01:30:22 +000047 ],
48 libs: [
49 "unsupportedappusage",
50 "app-compat-annotations",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090051 "sdk_module-lib_current_framework-connectivity",
52 ],
53 impl_only_libs: [
54 // The build system will use framework-bluetooth module_current stubs, because
55 // of sdk_version: "module_current" above.
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +090056 "framework-bluetooth",
Junyu Lai2ef865e2022-01-17 11:52:57 +000057 "framework-wifi",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090058 // Compile against the entire implementation of framework-connectivity,
59 // including hidden methods. This is safe because if framework-connectivity-t is
60 // on the bootclasspath (i.e., T), then framework-connectivity is also on the
61 // bootclasspath (because it shipped in S).
62 //
63 // This compiles against the pre-jarjar target so that this code can use
64 // non-jarjard names of widely-used packages such as com.android.net.module.util.
65 "framework-connectivity-pre-jarjar",
paulhu802ab972021-12-14 01:30:22 +000066 ],
Junyu Lai8d323302022-01-13 06:43:37 +000067 aidl: {
68 generate_get_transaction_name: true,
69 include_dirs: [
70 // For connectivity-framework classes such as Network.aidl,
71 // and connectivity-framework-t classes such as
72 // NetworkStateSnapshot.aidl
73 "packages/modules/Connectivity/framework/aidl-export",
74 ],
75 },
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090076 apex_available: [
77 "com.android.tethering",
78 ],
79}
80
81java_library {
82 name: "framework-connectivity-tiramisu-pre-jarjar",
83 defaults: ["framework-connectivity-tiramisu-defaults"],
84 libs: [
85 "framework-bluetooth",
Junyu Lai2ef865e2022-01-17 11:52:57 +000086 "framework-wifi",
Remi NGUYEN VAN78585622022-02-01 23:07:33 +090087 "framework-connectivity-pre-jarjar",
88 ],
89 visibility: ["//packages/modules/Connectivity:__subpackages__"],
90}
91
92// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before
93// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to
94// framework-connectivity.
95java_sdk_library {
96 name: "framework-connectivity-tiramisu",
97 defaults: [
98 "framework-connectivity-tiramisu-defaults",
99 ],
100 // Do not add static_libs to this library: put them in framework-connectivity instead.
101 // The jarjar rules are only so that references to jarjared utils in
102 // framework-connectivity-pre-jarjar match at runtime.
103 jarjar_rules: ":connectivity-jarjar-rules",
paulhu802ab972021-12-14 01:30:22 +0000104 permitted_packages: [
Junyu Lai2ef865e2022-01-17 11:52:57 +0000105 "android.app.usage",
paulhu802ab972021-12-14 01:30:22 +0000106 "android.net",
107 "android.net.nsd",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900108 "android.nearby",
109 "com.android.connectivity",
110 "com.android.nearby",
paulhu802ab972021-12-14 01:30:22 +0000111 ],
paulhu802ab972021-12-14 01:30:22 +0000112 impl_library_visibility: [
113 "//packages/modules/Connectivity/Tethering/apex",
114 // In preparation for future move
115 "//packages/modules/Connectivity/apex",
116 "//packages/modules/Connectivity/service-t",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900117 "//packages/modules/Nearby/service",
paulhu802ab972021-12-14 01:30:22 +0000118 "//frameworks/base",
119
120 // Tests using hidden APIs
121 "//cts/tests/netlegacy22.api",
Lorenzo Colittieb8d8552022-02-01 13:51:42 +0900122 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest
paulhu802ab972021-12-14 01:30:22 +0000123 "//external/sl4a:__subpackages__",
Remi NGUYEN VANbdaa3512022-02-02 20:06:56 +0900124 "//frameworks/base/core/tests/bandwidthtests",
125 "//frameworks/base/core/tests/benchmarks",
126 "//frameworks/base/core/tests/utillib",
Aaron Huang7174ac32022-01-26 00:43:10 +0800127 "//frameworks/base/tests/vcn",
paulhu802ab972021-12-14 01:30:22 +0000128 "//frameworks/libs/net/common/testutils",
129 "//frameworks/libs/net/common/tests:__subpackages__",
130 "//frameworks/opt/telephony/tests/telephonytests",
131 "//packages/modules/CaptivePortalLogin/tests",
132 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
133 "//packages/modules/Connectivity/tests:__subpackages__",
Aaron Huang7174ac32022-01-26 00:43:10 +0800134 "//packages/modules/IPsec/tests/iketests",
paulhu802ab972021-12-14 01:30:22 +0000135 "//packages/modules/NetworkStack/tests:__subpackages__",
Remi NGUYEN VANa2f7b182022-01-07 13:18:54 +0900136 "//packages/modules/Nearby/tests:__subpackages__",
paulhu802ab972021-12-14 01:30:22 +0000137 "//packages/modules/Wifi/service/tests/wifitests",
138 ],
139}