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 { |
| 18 | // See: http://go/android-license-faq |
| 19 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 20 | } |
| 21 | |
Remi NGUYEN VAN | af582a0 | 2022-03-08 19:49:49 +0900 | [diff] [blame] | 22 | // Include build rules from Sources.bp |
| 23 | build = ["Sources.bp"] |
| 24 | |
Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 25 | java_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 VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 32 | // 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 VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 35 | java_defaults { |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 36 | name: "framework-connectivity-t-defaults", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 37 | sdk_version: "module_current", |
| 38 | min_sdk_version: "Tiramisu", |
Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 39 | defaults: [ |
| 40 | "framework-module-defaults", |
Remi NGUYEN VAN | 24b3c37 | 2021-12-16 15:10:40 +0000 | [diff] [blame] | 41 | ], |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 42 | srcs: [ |
| 43 | ":framework-connectivity-tiramisu-updatable-sources", |
Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 44 | ":framework-nearby-java-sources", |
| 45 | ], |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 46 | libs: [ |
| 47 | "unsupportedappusage", |
| 48 | "app-compat-annotations", |
Xinyi Zhou | 0d195ae | 2023-03-22 19:06:54 +0000 | [diff] [blame] | 49 | "androidx.annotation_annotation", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 50 | ], |
| 51 | impl_only_libs: [ |
| 52 | // The build system will use framework-bluetooth module_current stubs, because |
| 53 | // of sdk_version: "module_current" above. |
Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 54 | "framework-bluetooth", |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 55 | "framework-wifi", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 56 | // Compile against the entire implementation of framework-connectivity, |
| 57 | // including hidden methods. This is safe because if framework-connectivity-t is |
| 58 | // on the bootclasspath (i.e., T), then framework-connectivity is also on the |
| 59 | // bootclasspath (because it shipped in S). |
| 60 | // |
| 61 | // This compiles against the pre-jarjar target so that this code can use |
| 62 | // non-jarjard names of widely-used packages such as com.android.net.module.util. |
| 63 | "framework-connectivity-pre-jarjar", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 64 | ], |
Junyu Lai | 8d32330 | 2022-01-13 06:43:37 +0000 | [diff] [blame] | 65 | aidl: { |
| 66 | generate_get_transaction_name: true, |
| 67 | include_dirs: [ |
| 68 | // For connectivity-framework classes such as Network.aidl, |
| 69 | // and connectivity-framework-t classes such as |
| 70 | // NetworkStateSnapshot.aidl |
| 71 | "packages/modules/Connectivity/framework/aidl-export", |
| 72 | ], |
| 73 | }, |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 74 | apex_available: [ |
| 75 | "com.android.tethering", |
| 76 | ], |
| 77 | } |
| 78 | |
Paul Duffin | c8164e4 | 2022-07-28 10:52:09 +0000 | [diff] [blame] | 79 | filegroup { |
| 80 | name: "connectivity-t-hiddenapi-files", |
| 81 | srcs: ["hiddenapi/*.txt"], |
| 82 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 83 | } |
| 84 | |
Yuyang Huang | 33fa4d2 | 2023-02-14 22:59:37 +0900 | [diff] [blame] | 85 | // The filegroup lists files that are necessary for verifying building mdns as a standalone, |
| 86 | // for use with service-connectivity-mdns-standalone-build-test |
| 87 | filegroup { |
| 88 | name: "framework-connectivity-t-mdns-standalone-build-sources", |
| 89 | srcs: [ |
| 90 | "src/android/net/nsd/OffloadEngine.java", |
| 91 | "src/android/net/nsd/OffloadServiceInfo.java", |
| 92 | ], |
| 93 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 94 | } |
| 95 | |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 96 | java_library { |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 97 | name: "framework-connectivity-t-pre-jarjar", |
| 98 | defaults: ["framework-connectivity-t-defaults"], |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 99 | libs: [ |
| 100 | "framework-bluetooth", |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 101 | "framework-wifi", |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 102 | "framework-connectivity-pre-jarjar", |
| 103 | ], |
| 104 | visibility: ["//packages/modules/Connectivity:__subpackages__"], |
| 105 | } |
| 106 | |
| 107 | // SDK library for connectivity bootclasspath classes that were part of the non-updatable API before |
| 108 | // T, and were moved to the module in T. Other bootclasspath classes in connectivity should go to |
| 109 | // framework-connectivity. |
| 110 | java_sdk_library { |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 111 | name: "framework-connectivity-t", |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 112 | defaults: [ |
paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 113 | "framework-connectivity-t-defaults", |
junyulai | 91e3dc2 | 2022-02-09 18:21:56 +0800 | [diff] [blame] | 114 | "enable-framework-connectivity-t-targets", |
Remi NGUYEN VAN | 7858562 | 2022-02-01 23:07:33 +0900 | [diff] [blame] | 115 | ], |
| 116 | // Do not add static_libs to this library: put them in framework-connectivity instead. |
| 117 | // The jarjar rules are only so that references to jarjared utils in |
| 118 | // framework-connectivity-pre-jarjar match at runtime. |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 119 | jarjar_rules: ":framework-connectivity-jarjar-rules", |
Remi NGUYEN VAN | 77d4c4e | 2022-08-03 15:31:02 +0900 | [diff] [blame] | 120 | stub_only_libs: [ |
| 121 | // Use prebuilt framework-connectivity stubs to avoid circular dependencies |
| 122 | "sdk_module-lib_current_framework-connectivity", |
| 123 | ], |
| 124 | libs: [ |
| 125 | "sdk_module-lib_current_framework-connectivity", |
| 126 | ], |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 127 | permitted_packages: [ |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 128 | "android.app.usage", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 129 | "android.net", |
| 130 | "android.net.nsd", |
Remi NGUYEN VAN | a2f7b18 | 2022-01-07 13:18:54 +0900 | [diff] [blame] | 131 | "android.nearby", |
| 132 | "com.android.connectivity", |
| 133 | "com.android.nearby", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 134 | ], |
Paul Duffin | c8164e4 | 2022-07-28 10:52:09 +0000 | [diff] [blame] | 135 | |
| 136 | hidden_api: { |
| 137 | max_target_o_low_priority: [ |
| 138 | "hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt", |
| 139 | ], |
| 140 | max_target_r_low_priority: [ |
| 141 | "hiddenapi/hiddenapi-max-target-r-loprio.txt", |
| 142 | ], |
| 143 | unsupported: [ |
| 144 | "hiddenapi/hiddenapi-unsupported-tiramisu.txt", |
| 145 | ], |
| 146 | }, |
| 147 | |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 148 | impl_library_visibility: [ |
| 149 | "//packages/modules/Connectivity/Tethering/apex", |
| 150 | // In preparation for future move |
| 151 | "//packages/modules/Connectivity/apex", |
Remi NGUYEN VAN | 371e7f7 | 2022-07-25 18:52:58 +0900 | [diff] [blame] | 152 | "//packages/modules/Connectivity/service", // For R8 only |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 153 | "//packages/modules/Connectivity/service-t", |
Cole Faust | e49c11d | 2023-03-22 14:19:02 -0700 | [diff] [blame] | 154 | "//packages/modules/Connectivity/nearby:__subpackages__", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 155 | "//frameworks/base", |
| 156 | |
| 157 | // Tests using hidden APIs |
| 158 | "//cts/tests/netlegacy22.api", |
Lorenzo Colitti | eb8d855 | 2022-02-01 13:51:42 +0900 | [diff] [blame] | 159 | "//cts/tests/tests/app.usage", // NetworkUsageStatsTest |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 160 | "//external/sl4a:__subpackages__", |
Remi NGUYEN VAN | bdaa351 | 2022-02-02 20:06:56 +0900 | [diff] [blame] | 161 | "//frameworks/base/core/tests/bandwidthtests", |
| 162 | "//frameworks/base/core/tests/benchmarks", |
| 163 | "//frameworks/base/core/tests/utillib", |
Aaron Huang | 7174ac3 | 2022-01-26 00:43:10 +0800 | [diff] [blame] | 164 | "//frameworks/base/tests/vcn", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 165 | "//frameworks/libs/net/common/testutils", |
| 166 | "//frameworks/libs/net/common/tests:__subpackages__", |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 167 | "//frameworks/opt/net/ethernet/tests:__subpackages__", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 168 | "//frameworks/opt/telephony/tests/telephonytests", |
| 169 | "//packages/modules/CaptivePortalLogin/tests", |
| 170 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", |
| 171 | "//packages/modules/Connectivity/tests:__subpackages__", |
Aaron Huang | b5af0fe | 2022-02-11 13:52:29 +0800 | [diff] [blame] | 172 | "//packages/modules/IPsec/tests/iketests", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 173 | "//packages/modules/NetworkStack/tests:__subpackages__", |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 174 | "//packages/modules/Wifi/service/tests/wifitests", |
| 175 | ], |
| 176 | } |
Remi NGUYEN VAN | 348bbb0 | 2022-07-19 16:33:04 +0900 | [diff] [blame] | 177 | |
Yuyang Huang | 90a2cbd | 2023-02-09 16:29:16 +0900 | [diff] [blame] | 178 | // This rule is not used anymore(b/268440216). |
Remi NGUYEN VAN | 348bbb0 | 2022-07-19 16:33:04 +0900 | [diff] [blame] | 179 | platform_compat_config { |
| 180 | name: "connectivity-t-platform-compat-config", |
| 181 | src: ":framework-connectivity-t", |
| 182 | } |