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 | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 208 | }, |
| 209 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 210 | dists: [ |
| 211 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 212 | targets: [ |
| 213 | "sdk", |
| 214 | "win_sdk", |
| 215 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 216 | dir: "apistubs/android/module-lib/api", |
| 217 | dest: "android-non-updatable.txt", |
| 218 | tag: ".api.txt", |
| 219 | }, |
| 220 | { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 221 | targets: [ |
| 222 | "sdk", |
| 223 | "win_sdk", |
| 224 | ], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 225 | dir: "apistubs/android/module-lib/api", |
| 226 | dest: "android-non-updatable-removed.txt", |
| 227 | tag: ".removed-api.txt", |
| 228 | }, |
| 229 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 230 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 231 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 232 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 233 | // android_*_stubs_current modules are the stubs libraries compiled |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 234 | // from stub sources |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 235 | ///////////////////////////////////////////////////////////////////// |
| 236 | |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 237 | modules_public_stubs = [ |
| 238 | "android.net.ipsec.ike.stubs", |
| 239 | "art.module.public.api.stubs", |
| 240 | "conscrypt.module.public.api.stubs", |
| 241 | "framework-appsearch.stubs", |
| 242 | "framework-connectivity.stubs", |
| 243 | "framework-graphics.stubs", |
| 244 | "framework-media.stubs", |
| 245 | "framework-mediaprovider.stubs", |
| 246 | "framework-permission.stubs", |
| 247 | "framework-permission-s.stubs", |
| 248 | "framework-scheduling.stubs", |
| 249 | "framework-sdkextensions.stubs", |
| 250 | "framework-statsd.stubs", |
| 251 | "framework-tethering.stubs", |
| 252 | "framework-wifi.stubs", |
| 253 | "i18n.module.public.api.stubs", |
| 254 | ] |
| 255 | |
| 256 | modules_system_stubs = [ |
| 257 | "android.net.ipsec.ike.stubs.system", |
Victor Chang | 9f5cdff | 2021-05-12 10:47:16 +0100 | [diff] [blame] | 258 | "art.module.public.api.stubs.system", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 259 | "conscrypt.module.public.api.stubs", // Only has public stubs |
| 260 | "framework-appsearch.stubs.system", |
| 261 | "framework-connectivity.stubs.system", |
| 262 | "framework-graphics.stubs.system", |
| 263 | "framework-media.stubs.system", |
| 264 | "framework-mediaprovider.stubs.system", |
| 265 | "framework-permission.stubs.system", |
| 266 | "framework-permission-s.stubs.system", |
| 267 | "framework-scheduling.stubs.system", |
| 268 | "framework-sdkextensions.stubs.system", |
| 269 | "framework-statsd.stubs.system", |
| 270 | "framework-tethering.stubs.system", |
| 271 | "framework-wifi.stubs.system", |
| 272 | "i18n.module.public.api.stubs", // Only has public stubs |
| 273 | ] |
| 274 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 275 | java_defaults { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 276 | name: "android-non-updatable_defaults_stubs_current", |
| 277 | libs: ["stub-annotations"], |
| 278 | static_libs: ["framework-res-package-jar"], // Export package of framework-res |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 279 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 280 | system_modules: "none", |
| 281 | java_version: "1.8", |
| 282 | compile_dex: true, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 283 | dist: { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 284 | targets: [ |
| 285 | "sdk", |
| 286 | "win_sdk", |
| 287 | ], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 288 | tag: ".jar", |
| 289 | dest: "android-non-updatable.jar", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 290 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 291 | defaults_visibility: ["//visibility:private"], |
| 292 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 293 | } |
| 294 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 295 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 296 | name: "android-non-updatable.stubs", |
| 297 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 298 | srcs: [":api-stubs-docs-non-updatable"], |
| 299 | libs: modules_public_stubs, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 300 | dist: { |
| 301 | dir: "apistubs/android/public", |
| 302 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 303 | } |
| 304 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 305 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 306 | name: "android-non-updatable.stubs.system", |
| 307 | defaults: ["android-non-updatable_defaults_stubs_current"], |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 308 | srcs: [":system-api-stubs-docs-non-updatable"], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 309 | libs: modules_system_stubs, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 310 | dist: { |
| 311 | dir: "apistubs/android/system", |
| 312 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 313 | } |
| 314 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 315 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 316 | name: "android-non-updatable.stubs.module_lib", |
| 317 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 318 | srcs: [":module-lib-api-stubs-docs-non-updatable"], |
| 319 | libs: [ |
| 320 | "sdk_system_current_android", |
| 321 | // NOTE: The below can be removed once the prebuilt stub contains IKE. |
| 322 | "sdk_system_current_android.net.ipsec.ike", |
| 323 | ], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 324 | dist: { |
| 325 | dir: "apistubs/android/module-lib", |
| 326 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 327 | } |
| 328 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 329 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 330 | name: "android-non-updatable.stubs.test", |
| 331 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 332 | srcs: [":test-api-stubs-docs-non-updatable"], |
| 333 | libs: modules_system_stubs, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 334 | dist: { |
| 335 | dir: "apistubs/android/test", |
| 336 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 337 | } |
| 338 | |
| 339 | java_defaults { |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 340 | name: "android_stubs_dists_default", |
| 341 | dist: { |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 342 | targets: [ |
| 343 | "sdk", |
| 344 | "win_sdk", |
| 345 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 346 | tag: ".jar", |
| 347 | dest: "android.jar", |
| 348 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 349 | defaults_visibility: ["//frameworks/base/services"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 350 | } |
| 351 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 352 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 353 | name: "android_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 354 | static_libs: modules_public_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 355 | "android-non-updatable.stubs", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 356 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 357 | ], |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 358 | defaults: ["android.jar_defaults"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 359 | } |
| 360 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 361 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 362 | name: "android_system_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 363 | static_libs: modules_system_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 364 | "android-non-updatable.stubs.system", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 365 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 366 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 367 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 368 | "android.jar_defaults", |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 369 | "android_stubs_dists_default", |
| 370 | ], |
| 371 | dist: { |
| 372 | dir: "apistubs/android/system", |
| 373 | }, |
| 374 | dists: [ |
| 375 | { |
| 376 | // Legacy dist path |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 377 | targets: [ |
| 378 | "sdk", |
| 379 | "win_sdk", |
| 380 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 381 | tag: ".jar", |
| 382 | dest: "android_system.jar", |
| 383 | }, |
| 384 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 385 | } |
| 386 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 387 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 388 | name: "android_test_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 389 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 390 | // the SystemApi of framework-non-updatable-sources. |
| 391 | static_libs: modules_system_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 392 | "android-non-updatable.stubs.test", |
Anton Hansson | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame] | 393 | "private-stub-annotations-jar", |
| 394 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 395 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 396 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 397 | "android_stubs_dists_default", |
| 398 | ], |
| 399 | dist: { |
| 400 | dir: "apistubs/android/test", |
| 401 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 402 | } |
| 403 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 404 | java_library { |
Anton Hansson | 1b9cf09 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 405 | name: "android_module_lib_stubs_current", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 406 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 407 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 408 | "android_stubs_dists_default", |
| 409 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 410 | static_libs: [ |
| 411 | "android-non-updatable.stubs.module_lib", |
| 412 | "art.module.public.api.stubs", |
Anton Hansson | b7d532e | 2021-02-05 11:40:25 +0000 | [diff] [blame] | 413 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 414 | dist: { |
| 415 | dir: "apistubs/android/module-lib", |
| 416 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 417 | } |
| 418 | |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 419 | java_library { |
| 420 | name: "android_system_server_stubs_current", |
| 421 | defaults: ["android_stubs_dists_default"], |
| 422 | srcs: [":services-non-updatable-stubs"], |
| 423 | installable: false, |
| 424 | static_libs: [ |
| 425 | "android_module_lib_stubs_current", |
| 426 | ], |
| 427 | sdk_version: "none", |
| 428 | system_modules: "none", |
| 429 | java_version: "1.8", |
| 430 | dist: { |
| 431 | dir: "apistubs/android/system-server", |
| 432 | }, |
| 433 | } |
| 434 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 435 | ///////////////////////////////////////////////////////////////////// |
| 436 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 437 | // libraries. |
| 438 | ///////////////////////////////////////////////////////////////////// |
| 439 | |
| 440 | droidstubs { |
| 441 | name: "hwbinder-stubs-docs", |
| 442 | srcs: [ |
| 443 | "core/java/android/os/HidlSupport.java", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 444 | "core/java/android/os/HidlMemory.java", |
| 445 | "core/java/android/os/HwBinder.java", |
| 446 | "core/java/android/os/HwBlob.java", |
| 447 | "core/java/android/os/HwParcel.java", |
| 448 | "core/java/android/os/IHwBinder.java", |
| 449 | "core/java/android/os/IHwInterface.java", |
| 450 | "core/java/android/os/DeadObjectException.java", |
| 451 | "core/java/android/os/DeadSystemException.java", |
| 452 | "core/java/android/os/NativeHandle.java", |
| 453 | "core/java/android/os/RemoteException.java", |
| 454 | "core/java/android/util/AndroidException.java", |
| 455 | ], |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 456 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 457 | installable: false, |
| 458 | sdk_version: "core_platform", |
| 459 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 460 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 461 | merge_annotations_dirs: [ |
| 462 | "metalava-manual", |
| 463 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 464 | args: priv_apps, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 465 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 466 | } |
| 467 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 468 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 469 | name: "hwbinder.stubs", |
| 470 | sdk_version: "core_current", |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 471 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 472 | srcs: [ |
| 473 | ":hwbinder-stubs-docs", |
| 474 | ], |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 475 | visibility: ["//visibility:public"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 476 | } |