David Su | 754fcc2 | 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 | |
David Su | 6dcd768 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 15 | filegroup { |
| 16 | name: "framework-wifi-updatable-exported-aidl-sources", |
| 17 | srcs: ["aidl-export/**/*.aidl"], |
| 18 | path: "aidl-export", |
| 19 | visibility: ["//visibility:private"], |
| 20 | } |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 21 | |
| 22 | filegroup { |
David Su | 6dcd768 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 23 | name: "framework-wifi-updatable-java-sources", |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 24 | srcs: [ |
| 25 | "java/**/*.java", |
| 26 | "java/**/*.aidl", |
| 27 | ], |
| 28 | exclude_srcs: [ |
| 29 | ":framework-wifi-non-updatable-sources" |
| 30 | ], |
| 31 | path: "java", |
David Su | 6dcd768 | 2020-01-21 11:23:00 -0800 | [diff] [blame] | 32 | visibility: ["//visibility:private"], |
| 33 | } |
| 34 | |
| 35 | filegroup { |
| 36 | name: "framework-wifi-updatable-sources", |
| 37 | srcs: [ |
| 38 | ":framework-wifi-updatable-java-sources", |
| 39 | ":framework-wifi-updatable-exported-aidl-sources", |
| 40 | ], |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | filegroup { |
| 44 | name: "framework-wifi-non-updatable-sources", |
| 45 | srcs: [ |
| 46 | // TODO(b/146011398) package android.net.wifi is now split amongst 2 jars: framework.jar and |
| 47 | // framework-wifi.jar. This is not a good idea, should move WifiNetworkScoreCache |
| 48 | // to a separate package. |
Roshan Pius | aa6527c | 2020-03-18 08:19:35 -0700 | [diff] [blame] | 49 | "java/android/net/wifi/SoftApConfToXmlMigrationUtil.java", |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 50 | "java/android/net/wifi/WifiNetworkScoreCache.java", |
Roshan Pius | 807b34a | 2020-02-24 09:12:52 -0800 | [diff] [blame] | 51 | "java/android/net/wifi/WifiMigration.java", |
Etan Cohen | 804d94a | 2020-02-15 17:33:27 -0800 | [diff] [blame] | 52 | "java/android/net/wifi/nl80211/*.java", |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 53 | ":libwificond_ipc_aidl", |
| 54 | ], |
| 55 | } |
| 56 | |
David Su | 130441b | 2019-12-14 21:37:20 -0800 | [diff] [blame] | 57 | filegroup { |
| 58 | name: "framework-wifi-annotations", |
| 59 | srcs: ["java/android/net/wifi/WifiAnnotations.java"], |
| 60 | } |
| 61 | |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 62 | // list of tests that are allowed to access @hide APIs from framework-wifi |
| 63 | test_access_hidden_api_whitelist = [ |
| 64 | "//frameworks/base/wifi/tests", |
| 65 | "//frameworks/opt/net/wifi/tests/wifitests:__subpackages__", |
David Su | 434fe60 | 2019-12-18 21:22:21 -0800 | [diff] [blame] | 66 | |
David Su | 4c5bab6 | 2020-01-07 13:01:30 -0800 | [diff] [blame] | 67 | "//external/robolectric-shadows:__subpackages__", |
David Su | 6c00e38 | 2020-01-06 15:24:42 -0800 | [diff] [blame] | 68 | "//frameworks/base/packages/SettingsLib/tests/integ", |
David Su | 812a8f1 | 2020-01-11 16:22:00 -0800 | [diff] [blame] | 69 | "//external/sl4a:__subpackages__", |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 70 | ] |
| 71 | |
David Su | 511a814 | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 72 | // wifi-service needs pre-jarjared version of framework-wifi so it can reference copied utility |
| 73 | // classes before they are renamed. |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 74 | java_library { |
David Su | 511a814 | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 75 | name: "framework-wifi-pre-jarjar", |
David Su | 3c0d197 | 2020-03-16 15:53:48 -0700 | [diff] [blame] | 76 | sdk_version: "module_current", |
David Su | 511a814 | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 77 | static_libs: [ |
| 78 | "framework-wifi-util-lib", |
David Su | 369c920 | 2020-01-09 18:09:56 -0800 | [diff] [blame] | 79 | "android.hardware.wifi-V1.0-java-constants", |
David Su | 511a814 | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 80 | ], |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 81 | libs: [ |
David Su | 369c920 | 2020-01-09 18:09:56 -0800 | [diff] [blame] | 82 | "framework-annotations-lib", |
| 83 | "unsupportedappusage", // for android.compat.annotation.UnsupportedAppUsage |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 84 | ], |
| 85 | srcs: [ |
| 86 | ":framework-wifi-updatable-sources", |
David Su | 72f9d63 | 2020-02-10 15:58:26 -0800 | [diff] [blame] | 87 | ":framework-wifi-util-lib-aidls", |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 88 | ], |
David Su | a6f0c86 | 2020-01-21 16:45:50 -0800 | [diff] [blame] | 89 | // java_api_finder must accompany `srcs` |
| 90 | plugins: ["java_api_finder"], |
David Su | 511a814 | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 91 | installable: false, |
| 92 | visibility: [ |
| 93 | "//frameworks/opt/net/wifi/service", |
| 94 | "//frameworks/opt/net/wifi/tests/wifitests", |
| 95 | ], |
| 96 | } |
| 97 | |
| 98 | // post-jarjar version of framework-wifi |
| 99 | java_library { |
| 100 | name: "framework-wifi", |
David Su | 3c0d197 | 2020-03-16 15:53:48 -0700 | [diff] [blame] | 101 | sdk_version: "module_current", |
David Su | 511a814 | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 102 | static_libs: [ |
| 103 | "framework-wifi-pre-jarjar", |
| 104 | ], |
| 105 | jarjar_rules: ":wifi-jarjar-rules", |
| 106 | |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 107 | installable: true, |
| 108 | optimize: { |
| 109 | enabled: false |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 110 | }, |
Jiyong Park | c81df3f | 2020-01-06 13:30:59 +0900 | [diff] [blame] | 111 | hostdex: true, // for hiddenapi check |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 112 | visibility: [ |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 113 | "//frameworks/opt/net/wifi/service:__subpackages__", |
| 114 | ] + test_access_hidden_api_whitelist, |
Jiyong Park | c81df3f | 2020-01-06 13:30:59 +0900 | [diff] [blame] | 115 | apex_available: [ |
| 116 | "com.android.wifi", |
| 117 | "test_com.android.wifi", |
| 118 | ], |
Vladimir Marko | 8a71e9b | 2020-03-19 14:30:21 +0000 | [diff] [blame] | 119 | permitted_packages: [ |
| 120 | "android.hardware.wifi", |
| 121 | "android.net.wifi", |
| 122 | "android.x.net.wifi", |
| 123 | ], |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 124 | } |
| 125 | |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 126 | stubs_defaults { |
| 127 | name: "framework-wifi-stubs-srcs-defaults", |
Anton Hansson | d20f030 | 2020-02-05 09:46:24 +0000 | [diff] [blame] | 128 | srcs: [ |
Anton Hansson | d20f030 | 2020-02-05 09:46:24 +0000 | [diff] [blame] | 129 | ":framework-wifi-updatable-sources", |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 130 | ":framework-wifi-util-lib-aidls", |
Anton Hansson | d20f030 | 2020-02-05 09:46:24 +0000 | [diff] [blame] | 131 | ], |
Anton Hansson | 2e53a53 | 2020-03-31 14:49:19 +0100 | [diff] [blame] | 132 | libs: [ |
| 133 | "framework-annotations-lib", |
| 134 | "framework-wifi-util-lib", |
| 135 | ], |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 136 | sdk_version: "module_current", |
Anton Hansson | 8bf731c | 2020-04-30 14:26:22 +0100 | [diff] [blame] | 137 | dist: { dest: "framework-wifi.txt" }, |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | droidstubs { |
| 141 | name: "framework-wifi-stubs-srcs-publicapi", |
| 142 | defaults: [ |
| 143 | "framework-module-stubs-defaults-publicapi", |
| 144 | "framework-wifi-stubs-srcs-defaults", |
| 145 | ], |
Anton Hansson | 340954c | 2020-05-01 18:25:09 +0100 | [diff] [blame] | 146 | check_api: { |
| 147 | last_released: { |
| 148 | api_file: ":framework-wifi.api.public.latest", |
| 149 | removed_api_file: ":framework-wifi-removed.api.public.latest", |
| 150 | }, |
| 151 | api_lint: { |
| 152 | new_since: ":framework-wifi.api.public.latest", |
| 153 | baseline_file: "api/lint-baseline.txt", |
| 154 | }, |
| 155 | }, |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | droidstubs { |
| 159 | name: "framework-wifi-stubs-srcs-systemapi", |
| 160 | defaults: [ |
| 161 | "framework-module-stubs-defaults-systemapi", |
| 162 | "framework-wifi-stubs-srcs-defaults", |
| 163 | ], |
Anton Hansson | 340954c | 2020-05-01 18:25:09 +0100 | [diff] [blame] | 164 | check_api: { |
| 165 | last_released: { |
| 166 | api_file: ":framework-wifi.api.system.latest", |
| 167 | removed_api_file: ":framework-wifi-removed.api.system.latest", |
| 168 | }, |
| 169 | api_lint: { |
| 170 | new_since: ":framework-wifi.api.system.latest", |
| 171 | baseline_file: "api/system-lint-baseline.txt", |
| 172 | }, |
| 173 | }, |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 174 | } |
| 175 | |
| 176 | droidstubs { |
| 177 | name: "framework-wifi-api-module_libs_api", |
| 178 | defaults: [ |
| 179 | "framework-module-api-defaults-module_libs_api", |
| 180 | "framework-wifi-stubs-srcs-defaults", |
| 181 | ], |
Anton Hansson | 340954c | 2020-05-01 18:25:09 +0100 | [diff] [blame] | 182 | check_api: { |
| 183 | last_released: { |
| 184 | api_file: ":framework-wifi.api.module-lib.latest", |
| 185 | removed_api_file: ":framework-wifi-removed.api.module-lib.latest", |
| 186 | }, |
| 187 | api_lint: { |
| 188 | new_since: ":framework-wifi.api.module-lib.latest", |
| 189 | }, |
| 190 | }, |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | droidstubs { |
| 194 | name: "framework-wifi-stubs-srcs-module_libs_api", |
| 195 | defaults: [ |
| 196 | "framework-module-stubs-defaults-module_libs_api", |
| 197 | "framework-wifi-stubs-srcs-defaults", |
| 198 | ], |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 199 | } |
| 200 | |
| 201 | java_library { |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 202 | name: "framework-wifi-stubs-publicapi", |
| 203 | srcs: [":framework-wifi-stubs-srcs-publicapi"], |
Anton Hansson | 013dc72 | 2020-03-24 19:50:06 +0000 | [diff] [blame] | 204 | defaults: ["framework-module-stubs-lib-defaults-publicapi"], |
Anton Hansson | 8bf731c | 2020-04-30 14:26:22 +0100 | [diff] [blame] | 205 | dist: { dest: "framework-wifi.jar" }, |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | java_library { |
| 209 | name: "framework-wifi-stubs-systemapi", |
| 210 | srcs: [":framework-wifi-stubs-srcs-systemapi"], |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 211 | libs: ["framework-annotations-lib"], |
Anton Hansson | 013dc72 | 2020-03-24 19:50:06 +0000 | [diff] [blame] | 212 | defaults: ["framework-module-stubs-lib-defaults-systemapi"], |
Anton Hansson | 8bf731c | 2020-04-30 14:26:22 +0100 | [diff] [blame] | 213 | dist: { dest: "framework-wifi.jar" }, |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | java_library { |
| 217 | name: "framework-wifi-stubs-module_libs_api", |
| 218 | srcs: [":framework-wifi-stubs-srcs-module_libs_api"], |
Anton Hansson | 6656c50 | 2020-02-05 09:49:35 +0000 | [diff] [blame] | 219 | libs: ["framework-annotations-lib"], |
Anton Hansson | 013dc72 | 2020-03-24 19:50:06 +0000 | [diff] [blame] | 220 | defaults: ["framework-module-stubs-lib-defaults-module_libs_api"], |
Anton Hansson | 8bf731c | 2020-04-30 14:26:22 +0100 | [diff] [blame] | 221 | dist: { dest: "framework-wifi.jar" }, |
David Su | 754fcc2 | 2019-09-04 14:31:58 -0700 | [diff] [blame] | 222 | } |
| 223 | |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 224 | // defaults for tests that need to build against framework-wifi's @hide APIs |
| 225 | java_defaults { |
| 226 | name: "framework-wifi-test-defaults", |
| 227 | sdk_version: "core_platform", // tests can use @CorePlatformApi's |
| 228 | libs: [ |
David Su | cc38e1f | 2020-01-07 19:47:28 -0800 | [diff] [blame] | 229 | // order matters: classes in framework-wifi are resolved before framework, meaning |
| 230 | // @hide APIs in framework-wifi are resolved before @SystemApi stubs in framework |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 231 | "framework-wifi", |
David Su | cc38e1f | 2020-01-07 19:47:28 -0800 | [diff] [blame] | 232 | "framework", |
David Su | 90ed105 | 2019-12-18 18:20:28 -0800 | [diff] [blame] | 233 | |
| 234 | // if sdk_version="" this gets automatically included, but here we need to add manually. |
| 235 | "framework-res", |
| 236 | ], |
| 237 | visibility: test_access_hidden_api_whitelist, |
| 238 | } |
David Su | 511a814 | 2020-01-09 14:02:21 -0800 | [diff] [blame] | 239 | |
| 240 | filegroup { |
| 241 | name: "wifi-jarjar-rules", |
| 242 | srcs: ["jarjar-rules.txt"], |
| 243 | } |