| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 1 | // Copyright (C) 2019 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| Bob Badour | c446a52 | 2021-02-04 00:08:31 -0800 | [diff] [blame] | 15 | package { |
| Aditya Choudhary | 5e4b820 | 2024-01-31 11:10:18 +0000 | [diff] [blame] | 16 | default_team: "trendy_team_fwk_wifi_hal", |
| Bob Badour | c446a52 | 2021-02-04 00:08:31 -0800 | [diff] [blame] | 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
| David Su | 9ca5d40 | 2020-06-10 12:39:07 -0700 | [diff] [blame] | 20 | java_defaults { |
| 21 | name: "wifi-module-sdk-version-defaults", |
| 22 | min_sdk_version: "30", |
| David Su | 9ca5d40 | 2020-06-10 12:39:07 -0700 | [diff] [blame] | 23 | } |
| 24 | |
| David Su | 005f890 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 25 | filegroup { |
| 26 | name: "framework-wifi-updatable-exported-aidl-sources", |
| 27 | srcs: ["aidl-export/**/*.aidl"], |
| 28 | path: "aidl-export", |
| 29 | visibility: ["//visibility:private"], |
| 30 | } |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 31 | |
| 32 | filegroup { |
| David Su | 005f890 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 33 | name: "framework-wifi-updatable-java-sources", |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 34 | srcs: [ |
| 35 | "java/**/*.java", |
| 36 | "java/**/*.aidl", |
| 37 | ], |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 38 | path: "java", |
| David Su | 005f890 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 39 | visibility: ["//visibility:private"], |
| 40 | } |
| 41 | |
| 42 | filegroup { |
| 43 | name: "framework-wifi-updatable-sources", |
| Cole Faust | 1660312 | 2024-10-23 22:54:10 +0000 | [diff] [blame] | 44 | device_common_srcs: [ |
| David Su | 005f890 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 45 | ":framework-wifi-updatable-java-sources", |
| 46 | ":framework-wifi-updatable-exported-aidl-sources", |
| David Su | 08f810e | 2020-12-09 10:40:18 -0800 | [diff] [blame] | 47 | ":module-utils-os-aidls", |
| Nate Jiang | f5522cb | 2024-01-10 14:41:30 -0800 | [diff] [blame] | 48 | ":wifi_framework_aconfig_flags_lib{.generated_srcjars}", |
| David Su | 005f890 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 49 | ], |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | filegroup { |
| David Su | 414e909 | 2019-12-14 21:37:20 -0800 | [diff] [blame] | 53 | name: "framework-wifi-annotations", |
| 54 | srcs: ["java/android/net/wifi/WifiAnnotations.java"], |
| 55 | } |
| 56 | |
| Nate Jiang | 72c34c12 | 2023-11-17 23:44:29 +0000 | [diff] [blame] | 57 | filegroup { |
| 58 | name: "wifi_javadoc_only_files", |
| Cole Faust | efa0e57 | 2023-12-20 11:57:09 -0800 | [diff] [blame] | 59 | srcs: [ |
| 60 | "java/android/net/wifi/package.html", |
| 61 | "java/android/net/wifi/rtt/package.html", |
| 62 | "java/android/net/wifi/p2p/package.html", |
| 63 | "java/android/net/wifi/aware/package.html", |
| Nate Jiang | 72c34c12 | 2023-11-17 23:44:29 +0000 | [diff] [blame] | 64 | ], |
| 65 | path: "java/android/net/wifi", |
| 66 | } |
| 67 | |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 68 | // list of tests that are allowed to access @hide APIs from framework-wifi |
| 69 | test_access_hidden_api_whitelist = [ |
| 70 | "//frameworks/base/wifi/tests", |
| David Su | 00bb68f | 2020-12-03 14:28:24 -0800 | [diff] [blame] | 71 | "//frameworks/base/wifi/non-updatable/tests", |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 72 | "//frameworks/opt/net/wifi/tests/wifitests:__subpackages__", |
| David Su | e36d77e | 2019-12-18 21:22:21 -0800 | [diff] [blame] | 73 | |
| Baligh Uddin | d5af8cf | 2020-12-23 04:04:00 +0000 | [diff] [blame] | 74 | "//packages/modules/Wifi/framework/tests", |
| 75 | "//packages/modules/Wifi/service/tests/wifitests:__subpackages__", |
| 76 | |
| David Su | cd246f7 | 2020-01-07 13:01:30 -0800 | [diff] [blame] | 77 | "//external/robolectric-shadows:__subpackages__", |
| David Su | d9ab8ff | 2020-01-06 15:24:42 -0800 | [diff] [blame] | 78 | "//frameworks/base/packages/SettingsLib/tests/integ", |
| David Su | 16cbcd1 | 2020-01-11 16:22:00 -0800 | [diff] [blame] | 79 | "//external/sl4a:__subpackages__", |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 80 | ] |
| 81 | |
| William Escande | 4367f1e | 2021-09-03 17:02:38 +0200 | [diff] [blame] | 82 | java_library { |
| 83 | name: "wifi-modules-utils", |
| 84 | sdk_version: "module_current", |
| 85 | min_sdk_version: "30", |
| 86 | static_libs: [ |
| 87 | "modules-utils-build", |
| William Escande | 7dca68d | 2021-09-20 19:54:45 +0200 | [diff] [blame] | 88 | "modules-utils-handlerexecutor", |
| William Escande | 4367f1e | 2021-09-03 17:02:38 +0200 | [diff] [blame] | 89 | "modules-utils-list-slice", |
| 90 | "modules-utils-preconditions", |
| William Escande | 7dca68d | 2021-09-20 19:54:45 +0200 | [diff] [blame] | 91 | "modules-utils-shell-command-handler", |
| 92 | "modules-utils-statemachine", |
| William Escande | 4367f1e | 2021-09-03 17:02:38 +0200 | [diff] [blame] | 93 | ], |
| 94 | apex_available: [ |
| 95 | "com.android.wifi", |
| 96 | "test_com.android.wifi", |
| 97 | ], |
| 98 | } |
| 99 | |
| David Su | 0c1d0c9 | 2020-10-26 11:12:04 -0700 | [diff] [blame] | 100 | // defaults shared between `framework-wifi` & `framework-wifi-pre-jarjar` |
| 101 | // java_sdk_library `framework-wifi` needs sources to generate stubs, so it cannot reuse |
| 102 | // `framework-wifi-pre-jarjar` |
| 103 | java_defaults { |
| 104 | name: "framework-wifi-defaults", |
| David Su | 9ca5d40 | 2020-06-10 12:39:07 -0700 | [diff] [blame] | 105 | defaults: ["wifi-module-sdk-version-defaults"], |
| David Su | 5d01d6d | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 106 | static_libs: [ |
| 107 | "framework-wifi-util-lib", |
| qiangjiang | 8b0bd81 | 2024-07-02 21:03:39 +0000 | [diff] [blame] | 108 | "net-utils-framework-wifi", |
| David Su | bcdd406 | 2020-01-09 18:09:56 -0800 | [diff] [blame] | 109 | "android.hardware.wifi-V1.0-java-constants", |
| William Escande | 4367f1e | 2021-09-03 17:02:38 +0200 | [diff] [blame] | 110 | "wifi-modules-utils", |
| Les Lee | af37e39 | 2022-03-16 16:06:41 +0800 | [diff] [blame] | 111 | "PlatformProperties", |
| maheshkkv | d799638 | 2024-11-04 19:57:59 -0800 | [diff] [blame] | 112 | "android.net.wifi.flags-aconfig-java", |
| Manaswini Paluri | 527b4c0 | 2024-11-11 10:58:15 +0530 | [diff] [blame] | 113 | "ranging_aconfig_flags_lib", |
| Nate Jiang | 8b6c189 | 2025-02-03 19:35:11 +0000 | [diff] [blame] | 114 | "android.security.flags-aconfig-java-export", |
| David Su | 5d01d6d | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 115 | ], |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 116 | libs: [ |
| Anton Hansson | 29a5afb | 2022-01-25 16:59:31 +0000 | [diff] [blame] | 117 | "androidx.annotation_annotation", |
| David Su | bcdd406 | 2020-01-09 18:09:56 -0800 | [diff] [blame] | 118 | "unsupportedappusage", // for android.compat.annotation.UnsupportedAppUsage |
| Les Lee | d0c76e4 | 2022-01-24 22:19:05 +0800 | [diff] [blame] | 119 | "app-compat-annotations", |
| Nate Jiang | 8d6db83 | 2024-01-05 11:38:08 -0800 | [diff] [blame] | 120 | // Add aconfig-annotations-lib as a dependency for the optimization |
| 121 | "aconfig-annotations-lib", |
| Zhi Dou | 48e2f0c | 2024-07-26 15:57:05 +0000 | [diff] [blame] | 122 | // library for generated flag code read new storage |
| zhidou | a50da37 | 2024-11-20 04:04:58 +0000 | [diff] [blame] | 123 | "aconfig_storage_stub", |
| Jihoon Kang | 295dde8 | 2024-09-06 05:20:58 +0000 | [diff] [blame] | 124 | "framework-configinfrastructure.stubs.module_lib", |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 125 | ], |
| Remi NGUYEN VAN | 37237ba | 2021-01-14 16:44:22 +0900 | [diff] [blame] | 126 | aidl: { |
| Siim Sammul | d9c0aa8 | 2022-08-15 11:34:31 +0000 | [diff] [blame] | 127 | generate_get_transaction_name: true, |
| Remi NGUYEN VAN | 37237ba | 2021-01-14 16:44:22 +0900 | [diff] [blame] | 128 | include_dirs: [ |
| Baligh Uddin | f009d85 | 2021-05-22 13:20:05 +0000 | [diff] [blame] | 129 | "packages/modules/Connectivity/framework/aidl-export", |
| Remi NGUYEN VAN | 37237ba | 2021-01-14 16:44:22 +0900 | [diff] [blame] | 130 | ], |
| 131 | }, |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 132 | srcs: [ |
| 133 | ":framework-wifi-updatable-sources", |
| David Su | 08f810e | 2020-12-09 10:40:18 -0800 | [diff] [blame] | 134 | ":module-utils-os-aidls", |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 135 | ], |
| David Su | 0c1d0c9 | 2020-10-26 11:12:04 -0700 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | // wifi-service needs pre-jarjared version of framework-wifi so it can reference copied utility |
| 139 | // classes before they are renamed. |
| 140 | java_library { |
| 141 | name: "framework-wifi-pre-jarjar", |
| 142 | defaults: ["framework-wifi-defaults"], |
| 143 | sdk_version: "module_current", |
| Paul Duffin | df9c33f | 2023-11-02 19:19:40 +0000 | [diff] [blame] | 144 | libs: [ |
| 145 | "framework-annotations-lib", |
| 146 | "framework-connectivity.stubs.module_lib", |
| Jihoon Kang | 201e81a | 2023-11-02 19:40:56 +0000 | [diff] [blame] | 147 | "framework-location.stubs.module_lib", |
| Quang Anh Luong | 87bfcfa | 2024-03-06 16:32:57 +0900 | [diff] [blame] | 148 | "framework-tethering.stubs.module_lib", |
| Paul Duffin | df9c33f | 2023-11-02 19:19:40 +0000 | [diff] [blame] | 149 | ], |
| David Su | 5d01d6d | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 150 | installable: false, |
| 151 | visibility: [ |
| 152 | "//frameworks/opt/net/wifi/service", |
| 153 | "//frameworks/opt/net/wifi/tests/wifitests", |
| Baligh Uddin | e65d766 | 2020-12-24 05:49:07 +0000 | [diff] [blame] | 154 | "//packages/modules/Wifi/service", |
| 155 | "//packages/modules/Wifi/service/tests/wifitests", |
| David Su | 5d01d6d | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 156 | ], |
| 157 | } |
| 158 | |
| 159 | // post-jarjar version of framework-wifi |
| Paul Duffin | d224b73 | 2020-05-13 20:33:29 +0100 | [diff] [blame] | 160 | java_sdk_library { |
| David Su | 5d01d6d | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 161 | name: "framework-wifi", |
| David Su | 9ca5d40 | 2020-06-10 12:39:07 -0700 | [diff] [blame] | 162 | defaults: [ |
| 163 | "framework-module-defaults", |
| David Su | 0c1d0c9 | 2020-10-26 11:12:04 -0700 | [diff] [blame] | 164 | "framework-wifi-defaults", |
| Paul Duffin | d224b73 | 2020-05-13 20:33:29 +0100 | [diff] [blame] | 165 | ], |
| 166 | |
| Paul Duffin | df9c33f | 2023-11-02 19:19:40 +0000 | [diff] [blame] | 167 | impl_only_libs: [ |
| 168 | "framework-connectivity.stubs.module_lib", |
| Quang Anh Luong | 87bfcfa | 2024-03-06 16:32:57 +0900 | [diff] [blame] | 169 | "framework-location.stubs.module_lib", |
| 170 | "framework-tethering.stubs.module_lib", |
| Paul Duffin | df9c33f | 2023-11-02 19:19:40 +0000 | [diff] [blame] | 171 | ], |
| 172 | |
| 173 | public: { |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 174 | libs: [ |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 175 | "framework-connectivity.stubs", |
| Quang Anh Luong | 87bfcfa | 2024-03-06 16:32:57 +0900 | [diff] [blame] | 176 | "framework-location.stubs", |
| 177 | "framework-tethering.stubs", |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 178 | ], |
| Paul Duffin | df9c33f | 2023-11-02 19:19:40 +0000 | [diff] [blame] | 179 | }, |
| 180 | system: { |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 181 | libs: [ |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 182 | "framework-connectivity.stubs.system", |
| Quang Anh Luong | 87bfcfa | 2024-03-06 16:32:57 +0900 | [diff] [blame] | 183 | "framework-location.stubs.system", |
| 184 | "framework-tethering.stubs.system", |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 185 | ], |
| Paul Duffin | df9c33f | 2023-11-02 19:19:40 +0000 | [diff] [blame] | 186 | }, |
| 187 | module_lib: { |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 188 | libs: [ |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 189 | "framework-connectivity.stubs.module_lib", |
| Quang Anh Luong | 87bfcfa | 2024-03-06 16:32:57 +0900 | [diff] [blame] | 190 | "framework-location.stubs.module_lib", |
| 191 | "framework-tethering.stubs.module_lib", |
| Xin Li | b069bbc | 2024-01-29 13:04:16 -0800 | [diff] [blame] | 192 | ], |
| Paul Duffin | df9c33f | 2023-11-02 19:19:40 +0000 | [diff] [blame] | 193 | }, |
| Nate Jiang | 72c34c12 | 2023-11-17 23:44:29 +0000 | [diff] [blame] | 194 | api_srcs: [ |
| 195 | ":wifi_javadoc_only_files", |
| 196 | ], |
| Remi NGUYEN VAN | 37237ba | 2021-01-14 16:44:22 +0900 | [diff] [blame] | 197 | |
| David Su | 5d01d6d | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 198 | jarjar_rules: ":wifi-jarjar-rules", |
| 199 | |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 200 | installable: true, |
| 201 | optimize: { |
| Cole Faust | efa0e57 | 2023-12-20 11:57:09 -0800 | [diff] [blame] | 202 | enabled: false, |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 203 | }, |
| Jiyong Park | e954a15 | 2020-01-06 13:30:59 +0900 | [diff] [blame] | 204 | hostdex: true, // for hiddenapi check |
| Paul Duffin | 4b3c643 | 2020-05-31 11:32:06 +0100 | [diff] [blame] | 205 | |
| Paul Duffin | 4b3c643 | 2020-05-31 11:32:06 +0100 | [diff] [blame] | 206 | // Restrict access to implementation library. |
| 207 | impl_library_visibility: [ |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 208 | "//frameworks/opt/net/wifi/service:__subpackages__", |
| Baligh Uddin | e65d766 | 2020-12-24 05:49:07 +0000 | [diff] [blame] | 209 | "//packages/modules/Wifi/service:__subpackages__", |
| Quang Luong | 79a07cf | 2021-12-13 12:11:39 -0800 | [diff] [blame] | 210 | "//packages/modules/Wifi/WifiDialog:__subpackages__", |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 211 | ] + test_access_hidden_api_whitelist, |
| Paul Duffin | 4b3c643 | 2020-05-31 11:32:06 +0100 | [diff] [blame] | 212 | |
| Jiyong Park | e954a15 | 2020-01-06 13:30:59 +0900 | [diff] [blame] | 213 | apex_available: [ |
| 214 | "com.android.wifi", |
| 215 | "test_com.android.wifi", |
| 216 | ], |
| Vladimir Marko | 58338c4 | 2020-03-19 14:30:21 +0000 | [diff] [blame] | 217 | permitted_packages: [ |
| 218 | "android.hardware.wifi", |
| 219 | "android.net.wifi", |
| Paul Duffin | bc41cb7 | 2020-05-28 14:55:44 +0100 | [diff] [blame] | 220 | // Created by jarjar rules. |
| 221 | "com.android.wifi.x", |
| Vladimir Marko | 58338c4 | 2020-03-19 14:30:21 +0000 | [diff] [blame] | 222 | ], |
| Nate Jiang | 71d7586 | 2021-05-26 13:09:09 -0700 | [diff] [blame] | 223 | lint: { |
| 224 | strict_updatability_linting: true, |
| MÃ¥rten Kongstad | 1e65fd1 | 2024-06-20 09:05:57 +0200 | [diff] [blame] | 225 | baseline_filename: "lint-baseline.xml", |
| Nate Jiang | 71d7586 | 2021-05-26 13:09:09 -0700 | [diff] [blame] | 226 | }, |
| David Su | 4b3032f | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 227 | } |
| 228 | |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 229 | // defaults for tests that need to build against framework-wifi's @hide APIs |
| 230 | java_defaults { |
| 231 | name: "framework-wifi-test-defaults", |
| David Su | 85ef0ad | 2020-11-25 10:55:11 -0800 | [diff] [blame] | 232 | sdk_version: "core_current", |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 233 | libs: [ |
| David Su | 8843a2d | 2020-01-07 19:47:28 -0800 | [diff] [blame] | 234 | // order matters: classes in framework-wifi are resolved before framework, meaning |
| 235 | // @hide APIs in framework-wifi are resolved before @SystemApi stubs in framework |
| Paul Duffin | d224b73 | 2020-05-13 20:33:29 +0100 | [diff] [blame] | 236 | "framework-wifi.impl", |
| David Su | 8843a2d | 2020-01-07 19:47:28 -0800 | [diff] [blame] | 237 | "framework", |
| David Su | dc878b8 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 238 | |
| 239 | // if sdk_version="" this gets automatically included, but here we need to add manually. |
| 240 | "framework-res", |
| 241 | ], |
| 242 | visibility: test_access_hidden_api_whitelist, |
| 243 | } |
| David Su | 5d01d6d | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 244 | |
| 245 | filegroup { |
| 246 | name: "wifi-jarjar-rules", |
| 247 | srcs: ["jarjar-rules.txt"], |
| 248 | } |
| Les Lee | d0c76e4 | 2022-01-24 22:19:05 +0800 | [diff] [blame] | 249 | |
| Cole Faust | efa0e57 | 2023-12-20 11:57:09 -0800 | [diff] [blame] | 250 | platform_compat_config { |
| Les Lee | d0c76e4 | 2022-01-24 22:19:05 +0800 | [diff] [blame] | 251 | name: "wifi-compat-config", |
| 252 | src: ":framework-wifi-pre-jarjar", |
| 253 | } |