Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [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 | |
| 15 | // How stubs are generated: |
| 16 | // |
| 17 | // raw source files --(metalava)--> stub source files --(javac)--> stub jar files |
| 18 | // |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 19 | // - The metalava conversion is done by droidstub modules |
| 20 | // - The javac compilation is done by java_library modules |
| 21 | // |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 22 | // The metalava conversion is also responsible for creating API signature files |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 23 | // and comparing them against the checked in API signature, and also checking compatibility |
| 24 | // with the latest frozen API signature. |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 25 | |
| 26 | ///////////////////////////////////////////////////////////////////// |
| 27 | // Common metalava configs |
| 28 | ///////////////////////////////////////////////////////////////////// |
| 29 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 30 | stubs_defaults { |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 31 | name: "metalava-non-updatable-api-stubs-default", |
Anton Hansson | 867f94c | 2021-05-05 10:32:31 +0100 | [diff] [blame] | 32 | defaults: ["android-non-updatable-stubs-defaults"], |
Aurimas Liutikas | 94bac9c | 2020-03-12 17:06:12 -0700 | [diff] [blame] | 33 | api_levels_annotations_enabled: false, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 34 | defaults_visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | ///////////////////////////////////////////////////////////////////// |
Anton Hansson | 51861e7 | 2020-11-13 09:55:29 +0000 | [diff] [blame] | 38 | // These modules provide source files for the stub libraries |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 39 | ///////////////////////////////////////////////////////////////////// |
| 40 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 41 | droidstubs { |
| 42 | name: "api-stubs-docs-non-updatable", |
| 43 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 44 | args: metalava_framework_docs_args, |
| 45 | check_api: { |
| 46 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 47 | api_file: "core/api/current.txt", |
| 48 | removed_api_file: "core/api/removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 49 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 50 | last_released: { |
| 51 | api_file: ":android-non-updatable.api.public.latest", |
| 52 | removed_api_file: ":android-non-updatable-removed.api.public.latest", |
Anton Hansson | 7f3393d | 2021-04-12 11:56:53 +0100 | [diff] [blame] | 53 | baseline_file: ":android-non-updatable-incompatibilities.api.public.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 54 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 55 | api_lint: { |
| 56 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 57 | new_since: ":android.api.public.latest", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 58 | }, |
| 59 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 60 | dists: [ |
| 61 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 62 | targets: [ |
| 63 | "sdk", |
| 64 | "win_sdk", |
| 65 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 66 | dir: "apistubs/android/public/api", |
| 67 | dest: "android-non-updatable.txt", |
| 68 | tag: ".api.txt", |
| 69 | }, |
| 70 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 71 | targets: [ |
| 72 | "sdk", |
| 73 | "win_sdk", |
| 74 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 75 | dir: "apistubs/android/public/api", |
| 76 | dest: "android-non-updatable-removed.txt", |
| 77 | tag: ".removed-api.txt", |
| 78 | }, |
| 79 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 80 | } |
| 81 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 82 | priv_apps = " --show-annotation android.annotation.SystemApi\\(" + |
| 83 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 84 | "\\)" |
| 85 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 86 | priv_apps_in_stubs = " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 87 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 88 | "\\)" |
| 89 | |
| 90 | test = " --show-annotation android.annotation.TestApi" |
| 91 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 92 | module_libs = " --show-annotation android.annotation.SystemApi\\(" + |
| 93 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 94 | "\\)" |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 95 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 96 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 97 | name: "system-api-stubs-docs-non-updatable", |
| 98 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 99 | args: metalava_framework_docs_args + priv_apps, |
| 100 | check_api: { |
| 101 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 102 | api_file: "core/api/system-current.txt", |
| 103 | removed_api_file: "core/api/system-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 104 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 105 | last_released: { |
| 106 | api_file: ":android-non-updatable.api.system.latest", |
| 107 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 108 | baseline_file: ":android-non-updatable-incompatibilities.api.system.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 109 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 110 | api_lint: { |
| 111 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 112 | new_since: ":android.api.system.latest", |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 113 | baseline_file: "core/api/system-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 114 | }, |
| 115 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 116 | dists: [ |
| 117 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 118 | targets: [ |
| 119 | "sdk", |
| 120 | "win_sdk", |
| 121 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 122 | dir: "apistubs/android/system/api", |
| 123 | dest: "android-non-updatable.txt", |
| 124 | tag: ".api.txt", |
| 125 | }, |
| 126 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 127 | targets: [ |
| 128 | "sdk", |
| 129 | "win_sdk", |
| 130 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 131 | dir: "apistubs/android/system/api", |
| 132 | dest: "android-non-updatable-removed.txt", |
| 133 | tag: ".removed-api.txt", |
| 134 | }, |
| 135 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | droidstubs { |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 139 | name: "test-api-stubs-docs-non-updatable", |
Anton Hansson | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame] | 140 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 141 | args: metalava_framework_docs_args + test + priv_apps_in_stubs, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 142 | check_api: { |
| 143 | current: { |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 144 | api_file: "core/api/test-current.txt", |
| 145 | removed_api_file: "core/api/test-removed.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 146 | }, |
| 147 | api_lint: { |
| 148 | enabled: true, |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 149 | baseline_file: "core/api/test-lint-baseline.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 150 | }, |
| 151 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 152 | dists: [ |
| 153 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 154 | targets: [ |
| 155 | "sdk", |
| 156 | "win_sdk", |
| 157 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 158 | dir: "apistubs/android/test/api", |
| 159 | dest: "android.txt", |
| 160 | tag: ".api.txt", |
| 161 | }, |
| 162 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 163 | targets: [ |
| 164 | "sdk", |
| 165 | "win_sdk", |
| 166 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 167 | dir: "apistubs/android/test/api", |
| 168 | dest: "removed.txt", |
| 169 | tag: ".removed-api.txt", |
| 170 | }, |
| 171 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 172 | targets: [ |
| 173 | "sdk", |
| 174 | "win_sdk", |
| 175 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 176 | dir: "apistubs/android/test/api", |
| 177 | dest: "android-non-updatable.txt", |
| 178 | tag: ".api.txt", |
| 179 | }, |
| 180 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 181 | targets: [ |
| 182 | "sdk", |
| 183 | "win_sdk", |
| 184 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 185 | dir: "apistubs/android/test/api", |
| 186 | dest: "android-non-updatable-removed.txt", |
| 187 | tag: ".removed-api.txt", |
| 188 | }, |
| 189 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 190 | } |
| 191 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 192 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 193 | name: "module-lib-api-stubs-docs-non-updatable", |
| 194 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 195 | args: metalava_framework_docs_args + priv_apps_in_stubs + module_libs, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 196 | check_api: { |
| 197 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 198 | api_file: "core/api/module-lib-current.txt", |
| 199 | removed_api_file: "core/api/module-lib-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 200 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 201 | last_released: { |
| 202 | api_file: ":android-non-updatable.api.module-lib.latest", |
| 203 | removed_api_file: ":android-non-updatable-removed.api.module-lib.latest", |
| 204 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 205 | api_lint: { |
| 206 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 207 | new_since: ":android.api.module-lib.latest", |
Anton Hansson | 1f44941 | 2021-06-04 22:30:52 +0100 | [diff] [blame] | 208 | baseline_file: "core/api/module-lib-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 209 | }, |
| 210 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 211 | dists: [ |
| 212 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 213 | targets: [ |
| 214 | "sdk", |
| 215 | "win_sdk", |
| 216 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 217 | dir: "apistubs/android/module-lib/api", |
| 218 | dest: "android-non-updatable.txt", |
| 219 | tag: ".api.txt", |
| 220 | }, |
| 221 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 222 | targets: [ |
| 223 | "sdk", |
| 224 | "win_sdk", |
| 225 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 226 | dir: "apistubs/android/module-lib/api", |
| 227 | dest: "android-non-updatable-removed.txt", |
| 228 | tag: ".removed-api.txt", |
| 229 | }, |
| 230 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 231 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 232 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 233 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 234 | // android_*_stubs_current modules are the stubs libraries compiled |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 235 | // from stub sources |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 236 | ///////////////////////////////////////////////////////////////////// |
| 237 | |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 238 | modules_public_stubs = [ |
| 239 | "android.net.ipsec.ike.stubs", |
| 240 | "art.module.public.api.stubs", |
| 241 | "conscrypt.module.public.api.stubs", |
| 242 | "framework-appsearch.stubs", |
| 243 | "framework-connectivity.stubs", |
| 244 | "framework-graphics.stubs", |
| 245 | "framework-media.stubs", |
| 246 | "framework-mediaprovider.stubs", |
Chun Zhang | a615ce5 | 2021-10-29 14:57:55 -0700 | [diff] [blame] | 247 | "framework-nearby.stubs", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 248 | "framework-permission.stubs", |
| 249 | "framework-permission-s.stubs", |
| 250 | "framework-scheduling.stubs", |
| 251 | "framework-sdkextensions.stubs", |
| 252 | "framework-statsd.stubs", |
Gavin Corkery | bc00644 | 2021-11-16 22:33:10 +0000 | [diff] [blame] | 253 | "framework-supplementalprocess.stubs", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 254 | "framework-tethering.stubs", |
Roshan Pius | 6c580dd | 2021-07-29 21:31:23 -0700 | [diff] [blame] | 255 | "framework-uwb.stubs", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 256 | "framework-wifi.stubs", |
| 257 | "i18n.module.public.api.stubs", |
| 258 | ] |
| 259 | |
| 260 | modules_system_stubs = [ |
| 261 | "android.net.ipsec.ike.stubs.system", |
Victor Chang | 9f5cdff | 2021-05-12 10:47:16 +0100 | [diff] [blame] | 262 | "art.module.public.api.stubs.system", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 263 | "conscrypt.module.public.api.stubs", // Only has public stubs |
| 264 | "framework-appsearch.stubs.system", |
| 265 | "framework-connectivity.stubs.system", |
| 266 | "framework-graphics.stubs.system", |
| 267 | "framework-media.stubs.system", |
| 268 | "framework-mediaprovider.stubs.system", |
Chun Zhang | a615ce5 | 2021-10-29 14:57:55 -0700 | [diff] [blame] | 269 | "framework-nearby.stubs.system", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 270 | "framework-permission.stubs.system", |
| 271 | "framework-permission-s.stubs.system", |
| 272 | "framework-scheduling.stubs.system", |
| 273 | "framework-sdkextensions.stubs.system", |
| 274 | "framework-statsd.stubs.system", |
Gavin Corkery | bc00644 | 2021-11-16 22:33:10 +0000 | [diff] [blame] | 275 | "framework-supplementalprocess.stubs", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 276 | "framework-tethering.stubs.system", |
Roshan Pius | 6c580dd | 2021-07-29 21:31:23 -0700 | [diff] [blame] | 277 | "framework-uwb.stubs.system", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 278 | "framework-wifi.stubs.system", |
| 279 | "i18n.module.public.api.stubs", // Only has public stubs |
| 280 | ] |
| 281 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 282 | java_defaults { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 283 | name: "android-non-updatable_defaults_stubs_current", |
| 284 | libs: ["stub-annotations"], |
| 285 | static_libs: ["framework-res-package-jar"], // Export package of framework-res |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 286 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 287 | system_modules: "none", |
| 288 | java_version: "1.8", |
| 289 | compile_dex: true, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 290 | dist: { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 291 | targets: [ |
| 292 | "sdk", |
| 293 | "win_sdk", |
| 294 | ], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 295 | tag: ".jar", |
| 296 | dest: "android-non-updatable.jar", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 297 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 298 | defaults_visibility: ["//visibility:private"], |
| 299 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 300 | } |
| 301 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 302 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 303 | name: "android-non-updatable.stubs", |
| 304 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 305 | srcs: [":api-stubs-docs-non-updatable"], |
| 306 | libs: modules_public_stubs, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 307 | dist: { |
| 308 | dir: "apistubs/android/public", |
| 309 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 310 | } |
| 311 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 312 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 313 | name: "android-non-updatable.stubs.system", |
| 314 | defaults: ["android-non-updatable_defaults_stubs_current"], |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 315 | srcs: [":system-api-stubs-docs-non-updatable"], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 316 | libs: modules_system_stubs, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 317 | dist: { |
| 318 | dir: "apistubs/android/system", |
| 319 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 320 | } |
| 321 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 322 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 323 | name: "android-non-updatable.stubs.module_lib", |
| 324 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 325 | srcs: [":module-lib-api-stubs-docs-non-updatable"], |
| 326 | libs: [ |
markchien | cd813a3 | 2021-11-11 00:42:55 +0800 | [diff] [blame] | 327 | "sdk_module-lib_current_framework-tethering", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 328 | "sdk_system_current_android", |
| 329 | // NOTE: The below can be removed once the prebuilt stub contains IKE. |
| 330 | "sdk_system_current_android.net.ipsec.ike", |
| 331 | ], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 332 | dist: { |
| 333 | dir: "apistubs/android/module-lib", |
| 334 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 335 | } |
| 336 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 337 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 338 | name: "android-non-updatable.stubs.test", |
| 339 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 340 | srcs: [":test-api-stubs-docs-non-updatable"], |
| 341 | libs: modules_system_stubs, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 342 | dist: { |
| 343 | dir: "apistubs/android/test", |
| 344 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 345 | } |
| 346 | |
| 347 | java_defaults { |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 348 | name: "android_stubs_dists_default", |
| 349 | dist: { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 350 | targets: [ |
| 351 | "sdk", |
| 352 | "win_sdk", |
| 353 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 354 | tag: ".jar", |
| 355 | dest: "android.jar", |
| 356 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 357 | defaults_visibility: ["//frameworks/base/services"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 358 | } |
| 359 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 360 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 361 | name: "android_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 362 | static_libs: modules_public_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 363 | "android-non-updatable.stubs", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 364 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 365 | ], |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 366 | defaults: ["android.jar_defaults"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 367 | } |
| 368 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 369 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 370 | name: "android_system_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 371 | static_libs: modules_system_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 372 | "android-non-updatable.stubs.system", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 373 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 374 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 375 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 376 | "android.jar_defaults", |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 377 | "android_stubs_dists_default", |
| 378 | ], |
| 379 | dist: { |
| 380 | dir: "apistubs/android/system", |
| 381 | }, |
| 382 | dists: [ |
| 383 | { |
| 384 | // Legacy dist path |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 385 | targets: [ |
| 386 | "sdk", |
| 387 | "win_sdk", |
| 388 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 389 | tag: ".jar", |
| 390 | dest: "android_system.jar", |
| 391 | }, |
| 392 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 393 | } |
| 394 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 395 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 396 | name: "android_test_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 397 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 398 | // the SystemApi of framework-non-updatable-sources. |
| 399 | static_libs: modules_system_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 400 | "android-non-updatable.stubs.test", |
Anton Hansson | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame] | 401 | "private-stub-annotations-jar", |
| 402 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 403 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 404 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 405 | "android_stubs_dists_default", |
| 406 | ], |
| 407 | dist: { |
| 408 | dir: "apistubs/android/test", |
| 409 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 410 | } |
| 411 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 412 | java_library { |
Anton Hansson | 1b9cf09 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 413 | name: "android_module_lib_stubs_current", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 414 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 415 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 416 | "android_stubs_dists_default", |
| 417 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 418 | static_libs: [ |
| 419 | "android-non-updatable.stubs.module_lib", |
Victor Chang | 6b107a9 | 2021-06-17 23:49:42 +0100 | [diff] [blame] | 420 | "art.module.public.api.stubs.module_lib", |
Anton Hansson | b7d532e | 2021-02-05 11:40:25 +0000 | [diff] [blame] | 421 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 422 | dist: { |
| 423 | dir: "apistubs/android/module-lib", |
| 424 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 425 | } |
| 426 | |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 427 | java_library { |
| 428 | name: "android_system_server_stubs_current", |
| 429 | defaults: ["android_stubs_dists_default"], |
| 430 | srcs: [":services-non-updatable-stubs"], |
| 431 | installable: false, |
| 432 | static_libs: [ |
| 433 | "android_module_lib_stubs_current", |
| 434 | ], |
| 435 | sdk_version: "none", |
| 436 | system_modules: "none", |
| 437 | java_version: "1.8", |
| 438 | dist: { |
| 439 | dir: "apistubs/android/system-server", |
| 440 | }, |
| 441 | } |
| 442 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 443 | ///////////////////////////////////////////////////////////////////// |
| 444 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 445 | // libraries. |
| 446 | ///////////////////////////////////////////////////////////////////// |
| 447 | |
| 448 | droidstubs { |
| 449 | name: "hwbinder-stubs-docs", |
| 450 | srcs: [ |
| 451 | "core/java/android/os/HidlSupport.java", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 452 | "core/java/android/os/HidlMemory.java", |
| 453 | "core/java/android/os/HwBinder.java", |
| 454 | "core/java/android/os/HwBlob.java", |
| 455 | "core/java/android/os/HwParcel.java", |
| 456 | "core/java/android/os/IHwBinder.java", |
| 457 | "core/java/android/os/IHwInterface.java", |
| 458 | "core/java/android/os/DeadObjectException.java", |
| 459 | "core/java/android/os/DeadSystemException.java", |
| 460 | "core/java/android/os/NativeHandle.java", |
| 461 | "core/java/android/os/RemoteException.java", |
| 462 | "core/java/android/util/AndroidException.java", |
| 463 | ], |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 464 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 465 | installable: false, |
| 466 | sdk_version: "core_platform", |
| 467 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 468 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 469 | merge_annotations_dirs: [ |
| 470 | "metalava-manual", |
| 471 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 472 | args: priv_apps, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 473 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 474 | } |
| 475 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 476 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 477 | name: "hwbinder.stubs", |
| 478 | sdk_version: "core_current", |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 479 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 480 | srcs: [ |
| 481 | ":hwbinder-stubs-docs", |
| 482 | ], |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 483 | visibility: ["//visibility:public"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 484 | } |