1// 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 default_team: "trendy_team_fwk_core_networking", 19 // See: http://go/android-license-faq 20 default_applicable_licenses: ["Android-Apache-2.0"], 21} 22 23framework_remoteauth_srcs = [":framework-remoteauth-java-sources"] 24framework_remoteauth_api_srcs = [] 25 26java_defaults { 27 name: "enable-remoteauth-targets", 28 enabled: true, 29} 30 31// Include build rules from Sources.bp 32build = ["Sources.bp"] 33 34java_defaults { 35 name: "enable-framework-connectivity-t-targets", 36 enabled: true, 37} 38 39// The above defaults can be used to disable framework-connectivity t 40// targets while minimizing merge conflicts in the build rules. 41 42// 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. 45java_defaults { 46 name: "framework-connectivity-t-defaults", 47 sdk_version: "module_current", 48 min_sdk_version: "Tiramisu", 49 defaults: [ 50 "framework-module-defaults", 51 ], 52 srcs: [ 53 ":framework-connectivity-tiramisu-updatable-sources", 54 ":framework-nearby-java-sources", 55 ":framework-thread-sources", 56 ], 57 libs: [ 58 "unsupportedappusage", 59 "app-compat-annotations", 60 "androidx.annotation_annotation", 61 ], 62 static_libs: [ 63 // Cannot go to framework-connectivity because mid_sdk checks require 31. 64 "modules-utils-binary-xml", 65 "com.android.nearby.flags-aconfig-java", 66 "com.android.net.thread.flags-aconfig-java", 67 ], 68 impl_only_libs: [ 69 // The build system will use framework-bluetooth module_current stubs, because 70 // of sdk_version: "module_current" above. 71 "framework-bluetooth.stubs.module_lib", 72 "framework-wifi.stubs.module_lib", 73 // 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", 81 ], 82 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 }, 91 apex_available: [ 92 "com.android.tethering", 93 ], 94} 95 96filegroup { 97 name: "connectivity-t-hiddenapi-files", 98 srcs: ["hiddenapi/*.txt"], 99 visibility: ["//packages/modules/Connectivity:__subpackages__"], 100} 101 102java_library { 103 name: "framework-connectivity-t-pre-jarjar", 104 defaults: ["framework-connectivity-t-defaults"], 105 libs: [ 106 "framework-bluetooth.stubs.module_lib", 107 "framework-wifi.stubs.module_lib", 108 "framework-connectivity-pre-jarjar", 109 "framework-location.stubs.module_lib", 110 ], 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 { 118 name: "framework-connectivity-t", 119 defaults: [ 120 "framework-connectivity-t-defaults", 121 "enable-framework-connectivity-t-targets", 122 ], 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. 126 jarjar_rules: ":framework-connectivity-jarjar-rules", 127 stub_only_libs: [ 128 // 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", 132 "com.android.nearby.flags-aconfig-java", 133 "com.android.net.thread.flags-aconfig-java", 134 // Use prebuilt framework-connectivity stubs to avoid circular dependencies 135 "sdk_module-lib_current_framework-connectivity", 136 ], 137 libs: [ 138 "framework-location.stubs.module_lib", 139 "sdk_module-lib_current_framework-connectivity", 140 ], 141 permitted_packages: [ 142 "android.app.usage", 143 "android.net", 144 "android.net.nsd", 145 "android.nearby", 146 "com.android.connectivity", 147 "com.android.nearby", 148 ], 149 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 162 impl_library_visibility: [ 163 "//packages/modules/Connectivity/Tethering/apex", 164 // In preparation for future move 165 "//packages/modules/Connectivity/apex", 166 "//packages/modules/Connectivity/service", // For R8 only 167 "//packages/modules/Connectivity/service-t", 168 "//packages/modules/Connectivity/nearby:__subpackages__", 169 "//packages/modules/Connectivity/remoteauth:__subpackages__", 170 "//frameworks/base", 171 172 // Tests using hidden APIs 173 "//cts/tests/netlegacy22.api", 174 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest 175 176 // TODO: b/374174952 Remove it when VCN CTS is moved to Connectivity/ 177 "//cts/tests/tests/vcn", 178 179 "//external/sl4a:__subpackages__", 180 "//frameworks/base/core/tests/bandwidthtests", 181 "//frameworks/base/core/tests/benchmarks", 182 "//frameworks/base/core/tests/utillib", 183 "//frameworks/base/services/tests/VpnTests", 184 "//frameworks/base/tests/vcn", 185 "//frameworks/opt/net/ethernet/tests:__subpackages__", 186 "//frameworks/opt/telephony/tests/telephonytests", 187 "//packages/modules/CaptivePortalLogin/tests", 188 "//packages/modules/Connectivity/staticlibs/testutils", 189 "//packages/modules/Connectivity/staticlibs/tests:__subpackages__", 190 "//packages/modules/Connectivity/Tethering/tests:__subpackages__", 191 "//packages/modules/Connectivity/tests:__subpackages__", 192 "//packages/modules/Connectivity/thread/tests:__subpackages__", 193 "//packages/modules/IPsec/tests/iketests", 194 "//packages/modules/NetworkStack/tests:__subpackages__", 195 "//packages/modules/Wifi/service/tests/wifitests", 196 ], 197 aconfig_declarations: [ 198 "com.android.net.flags-aconfig", 199 "com.android.net.thread.flags-aconfig", 200 "nearby_flags", 201 ], 202 lint: { 203 baseline_filename: "lint-baseline.xml", 204 }, 205} 206 207// This rule is not used anymore(b/268440216). 208platform_compat_config { 209 name: "connectivity-t-platform-compat-config", 210 src: ":framework-connectivity-t", 211} 212