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 installable: false, 106 libs: [ 107 "framework-bluetooth.stubs.module_lib", 108 "framework-wifi.stubs.module_lib", 109 "framework-connectivity-pre-jarjar", 110 "framework-location.stubs.module_lib", 111 ], 112 visibility: ["//packages/modules/Connectivity:__subpackages__"], 113} 114 115// SDK library for connectivity bootclasspath classes that were part of the non-updatable API before 116// T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to 117// framework-connectivity. 118java_sdk_library { 119 name: "framework-connectivity-t", 120 defaults: [ 121 "framework-connectivity-t-defaults", 122 "enable-framework-connectivity-t-targets", 123 ], 124 // Do not add static_libs to this library: put them in framework-connectivity instead. 125 // The jarjar rules are only so that references to jarjared utils in 126 // framework-connectivity-pre-jarjar match at runtime. 127 jarjar_rules: ":framework-connectivity-jarjar-rules", 128 stub_only_libs: [ 129 // static_libs is not used to compile stubs. So libs which have 130 // been included in static_libs might still need to 131 // be in stub_only_libs to be usable when generating the API stubs. 132 "com.android.net.flags-aconfig-java", 133 "com.android.nearby.flags-aconfig-java", 134 "com.android.net.thread.flags-aconfig-java", 135 // Use prebuilt framework-connectivity stubs to avoid circular dependencies 136 "sdk_module-lib_current_framework-connectivity", 137 ], 138 libs: [ 139 "framework-location.stubs.module_lib", 140 "sdk_module-lib_current_framework-connectivity", 141 ], 142 permitted_packages: [ 143 "android.app.usage", 144 "android.net", 145 "android.net.nsd", 146 "android.nearby", 147 "com.android.connectivity", 148 "com.android.nearby", 149 ], 150 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 163 impl_library_visibility: [ 164 "//packages/modules/Connectivity/Tethering/apex", 165 // In preparation for future move 166 "//packages/modules/Connectivity/apex", 167 "//packages/modules/Connectivity/service", // For R8 only 168 "//packages/modules/Connectivity/service-t", 169 "//packages/modules/Connectivity/nearby:__subpackages__", 170 "//packages/modules/Connectivity/remoteauth:__subpackages__", 171 "//frameworks/base", 172 173 // Tests using hidden APIs 174 "//cts/tests/netlegacy22.api", 175 "//cts/tests/tests/app.usage", // NetworkUsageStatsTest 176 177 // TODO: b/374174952 Remove it when VCN CTS is moved to Connectivity/ 178 "//cts/tests/tests/vcn", 179 180 "//external/sl4a:__subpackages__", 181 "//frameworks/base/core/tests/bandwidthtests", 182 "//frameworks/base/core/tests/benchmarks", 183 "//frameworks/base/core/tests/utillib", 184 "//frameworks/base/services/tests/VpnTests", 185 "//frameworks/base/tests/vcn", 186 "//frameworks/opt/net/ethernet/tests:__subpackages__", 187 "//frameworks/opt/telephony/tests/telephonytests", 188 "//packages/modules/CaptivePortalLogin/tests", 189 "//packages/modules/Connectivity/staticlibs/testutils", 190 "//packages/modules/Connectivity/staticlibs/tests:__subpackages__", 191 "//packages/modules/Connectivity/Tethering/tests:__subpackages__", 192 "//packages/modules/Connectivity/tests:__subpackages__", 193 "//packages/modules/Connectivity/thread/tests:__subpackages__", 194 "//packages/modules/IPsec/tests/iketests", 195 "//packages/modules/NetworkStack/tests:__subpackages__", 196 "//packages/modules/Wifi/service/tests/wifitests", 197 ], 198 aconfig_declarations: [ 199 "com.android.net.flags-aconfig", 200 "com.android.net.thread.flags-aconfig", 201 "nearby_flags", 202 ], 203 lint: { 204 baseline_filename: "lint-baseline.xml", 205 }, 206} 207 208// This rule is not used anymore(b/268440216). 209platform_compat_config { 210 name: "connectivity-t-platform-compat-config", 211 src: ":framework-connectivity-t", 212} 213