paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 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 | |
| 17 | package { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 18 | default_team: "trendy_team_fwk_core_networking", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 19 | // See: http://go/android-license-faq |
| 20 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 21 | } |
| 22 | |
Remi NGUYEN VAN | c41daa4 | 2023-08-14 15:34:20 +0900 | [diff] [blame] | 23 | framework_remoteauth_srcs = [":framework-remoteauth-java-sources"] |
| 24 | framework_remoteauth_api_srcs = [] |
| 25 | |
| 26 | java_defaults { |
| 27 | name: "enable-remoteauth-targets", |
| 28 | enabled: true, |
| 29 | } |
| 30 | |
Remi NGUYEN VAN | af582a0 | 2022-03-08 19:49:49 +0900 | [diff] [blame] | 31 | // Include build rules from Sources.bp |
| 32 | build = ["Sources.bp"] |
| 33 | |
Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 34 | java_defaults { |
| 35 | name: "enable-framework-connectivity-t-targets", |
| 36 | enabled: true, |
| 37 | } |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 38 | |
Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 39 | // The above defaults can be used to disable framework-connectivity t |
| 40 | // targets while minimizing merge conflicts in the build rules. |
| 41 | |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 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. |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 45 | java_defaults { |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 46 | name: "framework-connectivity-t-defaults", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 47 | sdk_version: "module_current", |
| 48 | min_sdk_version: "Tiramisu", |
Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 49 | defaults: [ |
| 50 | "framework-module-defaults", |
Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 51 | ], |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 52 | srcs: [ |
| 53 | ":framework-connectivity-tiramisu-updatable-sources", |
Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 54 | ":framework-nearby-java-sources", |
Kangping Dong | e7fef89 | 2023-08-11 15:30:09 +0800 | [diff] [blame] | 55 | ":framework-thread-sources", |
Igor Zaslavsky | e336586 | 2023-09-21 09:26:31 +0000 | [diff] [blame] | 56 | ], |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 57 | libs: [ |
| 58 | "unsupportedappusage", |
| 59 | "app-compat-annotations", |
Xinyi Zhou | 0d195ae | 2023-03-22 19:06:54 +0000 | [diff] [blame] | 60 | "androidx.annotation_annotation", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 61 | ], |
Junyu Lai | 2dce848 | 2023-12-05 08:22:43 +0000 | [diff] [blame] | 62 | static_libs: [ |
| 63 | // Cannot go to framework-connectivity because mid_sdk checks require 31. |
| 64 | "modules-utils-binary-xml", |
| 65 | ], |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 66 | impl_only_libs: [ |
| 67 | // The build system will use framework-bluetooth module_current stubs, because |
| 68 | // of sdk_version: "module_current" above. |
Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 69 | "framework-bluetooth", |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 70 | "framework-wifi", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 71 | // Compile against the entire implementation of framework-connectivity, |
| 72 | // including hidden methods. This is safe because if framework-connectivity-t is |
| 73 | // on the bootclasspath (i.e., T), then framework-connectivity is also on the |
| 74 | // bootclasspath (because it shipped in S). |
| 75 | // |
| 76 | // This compiles against the pre-jarjar target so that this code can use |
| 77 | // non-jarjard names of widely-used packages such as com.android.net.module.util. |
| 78 | "framework-connectivity-pre-jarjar", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 79 | ], |
Junyu Lai | 8d32330 | 2022-01-13 06:43:37 +0000 | [diff] [blame] | 80 | aidl: { |
| 81 | generate_get_transaction_name: true, |
| 82 | include_dirs: [ |
| 83 | // For connectivity-framework classes such as Network.aidl, |
| 84 | // and connectivity-framework-t classes such as |
| 85 | // NetworkStateSnapshot.aidl |
| 86 | "packages/modules/Connectivity/framework/aidl-export", |
| 87 | ], |
| 88 | }, |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 89 | apex_available: [ |
| 90 | "com.android.tethering", |
| 91 | ], |
| 92 | } |
| 93 | |
Paul Duffin | c8164e4 | 2022-07-28 10:52:09 +0000 | [diff] [blame] | 94 | filegroup { |
| 95 | name: "connectivity-t-hiddenapi-files", |
| 96 | srcs: ["hiddenapi/*.txt"], |
| 97 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 98 | } |
| 99 | |
Yuyang Huang | 33fa4d2 | 2023-02-14 22:59:37 +0900 | [diff] [blame] | 100 | // The filegroup lists files that are necessary for verifying building mdns as a standalone, |
| 101 | // for use with service-connectivity-mdns-standalone-build-test |
Yuyang Huang | cf25a8a | 2023-09-08 14:51:08 +0900 | [diff] [blame] | 102 | // This filegroup should never be included in anywhere in the module build. It is only used for |
| 103 | // building service-connectivity-mdns-standalone-build-test target. The files will be renamed by |
| 104 | // copybara to prevent them from being shadowed by the bootclasspath copies. |
Yuyang Huang | 33fa4d2 | 2023-02-14 22:59:37 +0900 | [diff] [blame] | 105 | filegroup { |
| 106 | name: "framework-connectivity-t-mdns-standalone-build-sources", |
| 107 | srcs: [ |
| 108 | "src/android/net/nsd/OffloadEngine.java", |
| 109 | "src/android/net/nsd/OffloadServiceInfo.java", |
| 110 | ], |
| 111 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 112 | } |
| 113 | |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 114 | java_library { |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 115 | name: "framework-connectivity-t-pre-jarjar", |
| 116 | defaults: ["framework-connectivity-t-defaults"], |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 117 | libs: [ |
| 118 | "framework-bluetooth", |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 119 | "framework-wifi", |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 120 | "framework-connectivity-pre-jarjar", |
Yahav Nussbaum | c712a57 | 2024-01-29 12:23:28 +0000 | [diff] [blame] | 121 | "framework-location.stubs.module_lib", |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 122 | ], |
| 123 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 124 | } |
| 125 | |
| 126 | // SDK library for connectivity bootclasspath classes that were part of the non-updatable API before |
| 127 | // T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to |
| 128 | // framework-connectivity. |
| 129 | java_sdk_library { |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 130 | name: "framework-connectivity-t", |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 131 | defaults: [ |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 132 | "framework-connectivity-t-defaults", |
junyulai | 91e3dc2 | 2022-02-09 18:21:56 +0800 | [diff] [blame] | 133 | "enable-framework-connectivity-t-targets", |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 134 | ], |
| 135 | // Do not add static_libs to this library: put them in framework-connectivity instead. |
| 136 | // The jarjar rules are only so that references to jarjared utils in |
| 137 | // framework-connectivity-pre-jarjar match at runtime. |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 138 | jarjar_rules: ":framework-connectivity-jarjar-rules", |
Remi NGUYEN VAN | 77d4c4e | 2022-08-03 15:31:02 +0900 | [diff] [blame] | 139 | stub_only_libs: [ |
Junyu Lai | d0e0494 | 2024-07-10 18:10:05 +0800 | [diff] [blame^] | 140 | // static_libs is not used to compile stubs. So libs which have |
| 141 | // been included in static_libs might still need to |
| 142 | // be in stub_only_libs to be usable when generating the API stubs. |
| 143 | "com.android.net.flags-aconfig-java", |
Remi NGUYEN VAN | 77d4c4e | 2022-08-03 15:31:02 +0900 | [diff] [blame] | 144 | // Use prebuilt framework-connectivity stubs to avoid circular dependencies |
| 145 | "sdk_module-lib_current_framework-connectivity", |
| 146 | ], |
| 147 | libs: [ |
Yahav Nussbaum | c712a57 | 2024-01-29 12:23:28 +0000 | [diff] [blame] | 148 | "framework-location.stubs.module_lib", |
Remi NGUYEN VAN | 77d4c4e | 2022-08-03 15:31:02 +0900 | [diff] [blame] | 149 | "sdk_module-lib_current_framework-connectivity", |
| 150 | ], |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 151 | permitted_packages: [ |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 152 | "android.app.usage", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 153 | "android.net", |
| 154 | "android.net.nsd", |
Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 155 | "android.nearby", |
| 156 | "com.android.connectivity", |
| 157 | "com.android.nearby", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 158 | ], |
Paul Duffin | c8164e4 | 2022-07-28 10:52:09 +0000 | [diff] [blame] | 159 | |
| 160 | hidden_api: { |
| 161 | max_target_o_low_priority: [ |
| 162 | "hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt", |
| 163 | ], |
| 164 | max_target_r_low_priority: [ |
| 165 | "hiddenapi/hiddenapi-max-target-r-loprio.txt", |
| 166 | ], |
| 167 | unsupported: [ |
| 168 | "hiddenapi/hiddenapi-unsupported-tiramisu.txt", |
| 169 | ], |
| 170 | }, |
| 171 | |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 172 | impl_library_visibility: [ |
| 173 | "//packages/modules/Connectivity/Tethering/apex", |
| 174 | // In preparation for future move |
| 175 | "//packages/modules/Connectivity/apex", |
Remi NGUYEN VAN | 371e7f7 | 2022-07-25 18:52:58 +0900 | [diff] [blame] | 176 | "//packages/modules/Connectivity/service", // For R8 only |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 177 | "//packages/modules/Connectivity/service-t", |
Cole Faust | e49c11d | 2023-03-22 14:19:02 -0700 | [diff] [blame] | 178 | "//packages/modules/Connectivity/nearby:__subpackages__", |
Igor Zaslavsky | ec344f4 | 2023-08-08 04:28:45 +0000 | [diff] [blame] | 179 | "//packages/modules/Connectivity/remoteauth:__subpackages__", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 180 | "//frameworks/base", |
| 181 | |
| 182 | // Tests using hidden APIs |
| 183 | "//cts/tests/netlegacy22.api", |
Lorenzo Colitti | eb8d855 | 2022-02-01 13:51:42 +0900 | [diff] [blame] | 184 | "//cts/tests/tests/app.usage", // NetworkUsageStatsTest |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 185 | "//external/sl4a:__subpackages__", |
Remi NGUYEN VAN | bdaa351 | 2022-02-02 20:06:56 +0900 | [diff] [blame] | 186 | "//frameworks/base/core/tests/bandwidthtests", |
| 187 | "//frameworks/base/core/tests/benchmarks", |
| 188 | "//frameworks/base/core/tests/utillib", |
Chiachang Wang | a5d9875 | 2024-02-28 07:50:15 +0000 | [diff] [blame] | 189 | "//frameworks/base/services/tests/VpnTests", |
Aaron Huang | 7174ac3 | 2022-01-26 00:43:10 +0800 | [diff] [blame] | 190 | "//frameworks/base/tests/vcn", |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 191 | "//frameworks/opt/net/ethernet/tests:__subpackages__", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 192 | "//frameworks/opt/telephony/tests/telephonytests", |
| 193 | "//packages/modules/CaptivePortalLogin/tests", |
Motomu Utsumi | c480039 | 2023-09-11 11:48:36 +0900 | [diff] [blame] | 194 | "//packages/modules/Connectivity/staticlibs/testutils", |
| 195 | "//packages/modules/Connectivity/staticlibs/tests:__subpackages__", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 196 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", |
| 197 | "//packages/modules/Connectivity/tests:__subpackages__", |
Handa Wang | 806f5a1 | 2023-12-04 12:53:39 +0800 | [diff] [blame] | 198 | "//packages/modules/Connectivity/thread/tests:__subpackages__", |
Aaron Huang | b5af0fe | 2022-02-11 13:52:29 +0800 | [diff] [blame] | 199 | "//packages/modules/IPsec/tests/iketests", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 200 | "//packages/modules/NetworkStack/tests:__subpackages__", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 201 | "//packages/modules/Wifi/service/tests/wifitests", |
| 202 | ], |
Jihoon Kang | 49bbfc9 | 2024-01-25 02:17:28 +0000 | [diff] [blame] | 203 | aconfig_declarations: [ |
| 204 | "com.android.net.flags-aconfig", |
Kangping Dong | 8fb80dd | 2024-02-22 10:59:36 +0800 | [diff] [blame] | 205 | "com.android.net.thread.flags-aconfig", |
Yahav Nussbaum | 259be7b | 2024-02-22 06:22:31 +0000 | [diff] [blame] | 206 | "nearby_flags", |
Jihoon Kang | 49bbfc9 | 2024-01-25 02:17:28 +0000 | [diff] [blame] | 207 | ], |
MÃ¥rten Kongstad | 4ece737 | 2024-06-20 09:05:51 +0200 | [diff] [blame] | 208 | lint: { |
| 209 | baseline_filename: "lint-baseline.xml", |
| 210 | }, |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 211 | } |
Remi NGUYEN VAN | 348bbb0 | 2022-07-19 16:33:04 +0900 | [diff] [blame] | 212 | |
Yuyang Huang | 90a2cbd | 2023-02-09 16:29:16 +0900 | [diff] [blame] | 213 | // This rule is not used anymore(b/268440216). |
Remi NGUYEN VAN | 348bbb0 | 2022-07-19 16:33:04 +0900 | [diff] [blame] | 214 | platform_compat_config { |
| 215 | name: "connectivity-t-platform-compat-config", |
| 216 | src: ":framework-connectivity-t", |
| 217 | } |