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 | // |
| 19 | // The metalava conversion is done by droidstub modules *-api-stubs-docs. |
| 20 | // The javac compilation is done by java_library modules android_*_stubs_current. |
| 21 | // The metalava conversion is also responsible for creating API signature files |
| 22 | // and comparing them against the last API signature in api/*-current.txt files |
| 23 | // and also against the latest frozen API signature in prebuilts/sdk/*/*/api/android.txt |
| 24 | // files. |
| 25 | |
| 26 | ///////////////////////////////////////////////////////////////////// |
| 27 | // Common metalava configs |
| 28 | ///////////////////////////////////////////////////////////////////// |
| 29 | |
| 30 | packages_to_document = [ |
| 31 | "android", |
| 32 | "dalvik", |
| 33 | "java", |
| 34 | "javax", |
| 35 | "junit", |
| 36 | "org.apache.http", |
| 37 | "org.json", |
| 38 | "org.w3c.dom", |
| 39 | "org.xml.sax", |
| 40 | "org.xmlpull", |
| 41 | ] |
| 42 | |
| 43 | stubs_defaults { |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 44 | name: "metalava-base-api-stubs-default", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 45 | srcs: [ |
| 46 | ":framework-non-updatable-sources", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 47 | "core/java/**/*.logtags", |
| 48 | ":opt-telephony-srcs", |
| 49 | ":opt-net-voip-srcs", |
Paul Duffin | 37c10f0 | 2020-03-26 15:33:48 +0000 | [diff] [blame] | 50 | ":art-module-public-api-stubs-source", |
Paul Duffin | 37c10f0 | 2020-03-26 15:33:48 +0000 | [diff] [blame] | 51 | ":android_icu4j_public_api_files", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 52 | ], |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 53 | // TODO(b/147699819): remove below aidl includes. |
| 54 | aidl: { |
| 55 | local_include_dirs: ["telephony/java"], |
| 56 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 57 | libs: ["framework-internal-utils"], |
| 58 | installable: false, |
| 59 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 60 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 61 | merge_annotations_dirs: [ |
| 62 | "metalava-manual", |
| 63 | ], |
Aurimas Liutikas | 6bb95ad | 2020-03-12 17:06:12 -0700 | [diff] [blame] | 64 | api_levels_annotations_enabled: false, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 65 | filter_packages: packages_to_document, |
| 66 | } |
| 67 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 68 | stubs_defaults { |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 69 | name: "metalava-full-api-stubs-default", |
| 70 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | e89d37d | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 71 | srcs: [ |
Paul Duffin | bf48c95 | 2020-05-14 17:55:46 +0100 | [diff] [blame] | 72 | ":conscrypt.module.public.api{.public.stubs.source}", |
Anton Hansson | e89d37d | 2020-05-07 12:06:00 +0100 | [diff] [blame] | 73 | ":framework-updatable-sources", |
| 74 | ], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 75 | sdk_version: "core_platform", |
| 76 | } |
| 77 | |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 78 | stubs_defaults { |
| 79 | name: "metalava-non-updatable-api-stubs-default", |
| 80 | defaults: ["metalava-base-api-stubs-default"], |
Anton Hansson | 92d79fd | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 81 | sdk_version: "core_platform", |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 82 | // There are a few classes from modules used as type arguments that |
| 83 | // need to be resolved by metalava. For now, we can use a previously |
| 84 | // finalized stub library to resolve them. If a new class gets added, |
| 85 | // this may be need to be revisited to use a manually maintained stub |
| 86 | // library with empty classes in order to resolve those references. |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 87 | libs: ["sdk_system_30_android"], |
Anton Hansson | 92d79fd | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 88 | aidl: { |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 89 | local_include_dirs: ["apex/media/aidl/stable"], |
Anton Hansson | 92d79fd | 2020-03-20 09:12:52 +0000 | [diff] [blame] | 90 | }, |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 91 | } |
| 92 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 93 | ///////////////////////////////////////////////////////////////////// |
| 94 | // *-api-stubs-docs modules providing source files for the stub libraries |
| 95 | ///////////////////////////////////////////////////////////////////// |
| 96 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 97 | // api-stubs-docs, system-api-stubs-docs, and test-api-stubs-docs have APIs |
| 98 | // from the non-updatable part of the platform as well as from the updatable |
| 99 | // modules |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 100 | droidstubs { |
| 101 | name: "api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 102 | defaults: ["metalava-full-api-stubs-default"], |
Artur Satayev | 7e7fdde3 | 2020-03-25 16:45:56 +0000 | [diff] [blame] | 103 | removed_dex_api_filename: "removed-dex.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 104 | arg_files: [ |
| 105 | "core/res/AndroidManifest.xml", |
| 106 | ], |
| 107 | args: metalava_framework_docs_args, |
| 108 | check_api: { |
| 109 | current: { |
| 110 | api_file: "api/current.txt", |
| 111 | removed_api_file: "api/removed.txt", |
| 112 | }, |
| 113 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 114 | api_file: ":android.api.public.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 115 | removed_api_file: ":removed.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 116 | baseline_file: ":public-api-incompatibilities-with-last-released", |
| 117 | }, |
| 118 | api_lint: { |
| 119 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 120 | new_since: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 121 | baseline_file: "api/lint-baseline.txt", |
| 122 | }, |
| 123 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 124 | dist: { |
| 125 | targets: ["sdk", "win_sdk"], |
| 126 | dir: "apistubs/android/public/api", |
| 127 | dest: "android.txt", |
| 128 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 129 | jdiff_enabled: true, |
| 130 | } |
| 131 | |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 132 | droidstubs { |
| 133 | name: "api-stubs-docs-non-updatable", |
| 134 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 135 | arg_files: ["core/res/AndroidManifest.xml"], |
| 136 | args: metalava_framework_docs_args, |
| 137 | check_api: { |
| 138 | current: { |
| 139 | api_file: "non-updatable-api/current.txt", |
| 140 | removed_api_file: "non-updatable-api/removed.txt", |
| 141 | }, |
| 142 | api_lint: { |
| 143 | enabled: true, |
| 144 | new_since: ":android-non-updatable.api.public.latest", |
| 145 | }, |
| 146 | }, |
| 147 | } |
| 148 | |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 149 | priv_apps = " " + |
| 150 | "--show-annotation android.annotation.SystemApi\\(" + |
| 151 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 152 | "\\) " |
| 153 | |
| 154 | module_libs = " " + |
| 155 | " --show-annotation android.annotation.SystemApi\\(" + |
| 156 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
| 157 | "\\) " |
| 158 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 159 | droidstubs { |
| 160 | name: "system-api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 161 | defaults: ["metalava-full-api-stubs-default"], |
Artur Satayev | 7e7fdde3 | 2020-03-25 16:45:56 +0000 | [diff] [blame] | 162 | removed_dex_api_filename: "system-removed-dex.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 163 | arg_files: [ |
| 164 | "core/res/AndroidManifest.xml", |
| 165 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 166 | args: metalava_framework_docs_args + priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 167 | check_api: { |
| 168 | current: { |
| 169 | api_file: "api/system-current.txt", |
| 170 | removed_api_file: "api/system-removed.txt", |
| 171 | }, |
| 172 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 173 | api_file: ":android.api.system.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 174 | removed_api_file: ":removed.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 175 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 176 | }, |
| 177 | api_lint: { |
| 178 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 179 | new_since: ":android.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 180 | baseline_file: "api/system-lint-baseline.txt", |
| 181 | }, |
| 182 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 183 | dist: { |
| 184 | targets: ["sdk", "win_sdk"], |
| 185 | dir: "apistubs/android/system/api", |
| 186 | dest: "android.txt", |
| 187 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 188 | jdiff_enabled: true, |
| 189 | } |
| 190 | |
| 191 | droidstubs { |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 192 | name: "system-api-stubs-docs-non-updatable", |
| 193 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 194 | arg_files: ["core/res/AndroidManifest.xml"], |
| 195 | args: metalava_framework_docs_args + priv_apps, |
| 196 | check_api: { |
| 197 | current: { |
| 198 | api_file: "non-updatable-api/system-current.txt", |
| 199 | removed_api_file: "non-updatable-api/system-removed.txt", |
| 200 | }, |
| 201 | api_lint: { |
| 202 | enabled: true, |
| 203 | new_since: ":android-non-updatable.api.system.latest", |
| 204 | baseline_file: "non-updatable-api/system-lint-baseline.txt", |
| 205 | }, |
| 206 | }, |
| 207 | } |
| 208 | |
| 209 | droidstubs { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 210 | name: "test-api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 211 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 212 | arg_files: [ |
| 213 | "core/res/AndroidManifest.xml", |
| 214 | ], |
| 215 | args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi", |
| 216 | check_api: { |
| 217 | current: { |
| 218 | api_file: "api/test-current.txt", |
| 219 | removed_api_file: "api/test-removed.txt", |
| 220 | }, |
| 221 | api_lint: { |
| 222 | enabled: true, |
| 223 | baseline_file: "api/test-lint-baseline.txt", |
| 224 | }, |
| 225 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 226 | dist: { |
| 227 | targets: ["sdk", "win_sdk"], |
| 228 | dir: "apistubs/android/test/api", |
| 229 | dest: "android.txt", |
| 230 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 234 | // Following droidstubs modules are for extra APIs for modules. |
| 235 | // The framework currently have two more API surfaces for modules: |
| 236 | // @SystemApi(client=MODULE_APPS) and @SystemApi(client=MODULE_LIBRARIES) |
| 237 | ///////////////////////////////////////////////////////////////////// |
| 238 | |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 239 | // TODO(b/146727827) remove the *-api module when we can teach metalava |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 240 | // about the relationship among the API surfaces. Currently, these modules are only to generate |
| 241 | // the API signature files and ensure that the APIs evolve in a backwards compatible manner. |
| 242 | // They however are NOT used for building the API stub. |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 243 | |
| 244 | droidstubs { |
| 245 | name: "module-lib-api", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 246 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 247 | arg_files: ["core/res/AndroidManifest.xml"], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 248 | args: metalava_framework_docs_args + module_libs, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 249 | check_api: { |
| 250 | current: { |
| 251 | api_file: "api/module-lib-current.txt", |
| 252 | removed_api_file: "api/module-lib-removed.txt", |
| 253 | }, |
Anton Hansson | 79e35c3 | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 254 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 255 | api_file: ":android.api.module-lib.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 256 | removed_api_file: ":removed.api.module-lib.latest", |
Anton Hansson | 79e35c3 | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 257 | baseline_file: ":module-lib-api-incompatibilities-with-last-released" |
| 258 | }, |
| 259 | api_lint: { |
| 260 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 261 | new_since: ":android.api.module-lib.latest", |
Anton Hansson | 79e35c3 | 2020-02-11 14:36:40 +0000 | [diff] [blame] | 262 | baseline_file: "api/module-lib-lint-baseline.txt", |
| 263 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 264 | }, |
Anton Hansson | d9a3fee | 2020-03-23 18:08:55 +0000 | [diff] [blame] | 265 | dist: { |
| 266 | targets: ["sdk", "win_sdk"], |
| 267 | dir: "apistubs/android/module-lib/api", |
| 268 | dest: "android.txt", |
| 269 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 270 | } |
| 271 | |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 272 | droidstubs { |
| 273 | name: "module-lib-api-stubs-docs-non-updatable", |
| 274 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 275 | arg_files: ["core/res/AndroidManifest.xml"], |
| 276 | args: metalava_framework_docs_args + module_libs, |
| 277 | check_api: { |
| 278 | current: { |
| 279 | api_file: "non-updatable-api/module-lib-current.txt", |
| 280 | removed_api_file: "non-updatable-api/module-lib-removed.txt", |
| 281 | }, |
| 282 | api_lint: { |
| 283 | enabled: true, |
| 284 | new_since: ":android-non-updatable.api.module-lib.latest", |
| 285 | }, |
| 286 | }, |
| 287 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 288 | |
| 289 | // The following droidstub module generates source files for the API stub library for |
| 290 | // modules. Note that it not only includes its own APIs but also other APIs that have |
| 291 | // narrower scope (all @SystemApis, not just the ones with 'client=MODULE_LIBRARIES'). |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 292 | |
| 293 | droidstubs { |
| 294 | name: "module-lib-api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 295 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 296 | arg_files: ["core/res/AndroidManifest.xml"], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 297 | args: metalava_framework_docs_args + priv_apps + module_libs, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 298 | } |
| 299 | |
| 300 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 301 | // android_*_stubs_current modules are the stubs libraries compiled |
| 302 | // from *-api-stubs-docs |
| 303 | ///////////////////////////////////////////////////////////////////// |
| 304 | |
| 305 | java_defaults { |
Anton Hansson | 87c7d28 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 306 | name: "android_defaults_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 307 | libs: [ "stub-annotations" ], |
Anton Hansson | 47994f3 | 2020-08-13 19:40:13 +0100 | [diff] [blame] | 308 | static_libs: [ |
| 309 | "framework-res-package-jar", // Export package of framework-res |
| 310 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 311 | errorprone: { |
| 312 | javacflags: [ |
| 313 | "-XepDisableAllChecks", |
| 314 | ], |
| 315 | }, |
Anton Hansson | 87c7d28 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 316 | java_resources: [":notices-for-framework-stubs"], |
| 317 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 318 | system_modules: "none", |
| 319 | java_version: "1.8", |
| 320 | compile_dex: true, |
| 321 | } |
| 322 | |
| 323 | java_library_static { |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 324 | name: "android_monolith_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 325 | srcs: [ ":api-stubs-docs" ], |
Anton Hansson | 206be52 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 326 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | 87c7d28 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 327 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 328 | } |
| 329 | |
| 330 | java_library_static { |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 331 | name: "android_merged_stubs_current", |
| 332 | srcs: [ ":api-stubs-docs-non-updatable" ], |
| 333 | static_libs: [ |
| 334 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 335 | "framework-media.stubs", |
| 336 | "framework-mediaprovider.stubs", |
| 337 | "framework-permission.stubs", |
| 338 | "framework-sdkextensions.stubs", |
| 339 | "framework-statsd.stubs", |
| 340 | "framework-tethering.stubs", |
| 341 | "framework-wifi.stubs", |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 342 | "private-stub-annotations-jar", |
| 343 | ], |
| 344 | defaults: ["android_defaults_stubs_current"], |
| 345 | } |
| 346 | |
| 347 | java_library_static { |
| 348 | name: "android_stubs_current", |
| 349 | static_libs: ["android_merged_stubs_current"], |
| 350 | defaults: ["android_defaults_stubs_current"], |
| 351 | } |
| 352 | |
| 353 | java_library_static { |
| 354 | name: "android_system_monolith_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 355 | srcs: [ ":system-api-stubs-docs" ], |
Anton Hansson | 206be52 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 356 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | 87c7d28 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 357 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 358 | } |
| 359 | |
| 360 | java_library_static { |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 361 | name: "android_system_merged_stubs_current", |
| 362 | srcs: [ ":system-api-stubs-docs-non-updatable" ], |
| 363 | static_libs: [ |
| 364 | "conscrypt.module.public.api.stubs", |
Paul Duffin | abebc6a | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 365 | "framework-media.stubs.system", |
| 366 | "framework-mediaprovider.stubs.system", |
| 367 | "framework-permission.stubs.system", |
| 368 | "framework-sdkextensions.stubs.system", |
| 369 | "framework-statsd.stubs.system", |
| 370 | "framework-tethering.stubs.system", |
| 371 | "framework-wifi.stubs.system", |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 372 | "private-stub-annotations-jar", |
| 373 | ], |
| 374 | defaults: ["android_defaults_stubs_current"], |
| 375 | } |
| 376 | |
| 377 | java_library_static { |
| 378 | name: "android_system_stubs_current", |
| 379 | static_libs: ["android_system_merged_stubs_current"], |
| 380 | defaults: ["android_defaults_stubs_current"], |
| 381 | } |
| 382 | |
| 383 | java_library_static { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 384 | name: "android_test_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 385 | srcs: [ ":test-api-stubs-docs" ], |
Anton Hansson | 206be52 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 386 | static_libs: [ "private-stub-annotations-jar" ], |
Anton Hansson | 87c7d28 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 387 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 388 | } |
| 389 | |
| 390 | java_library_static { |
Anton Hansson | 1b9cf09 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 391 | name: "android_module_lib_stubs_current", |
Anton Hansson | 08b48bb | 2020-02-08 20:43:19 +0000 | [diff] [blame] | 392 | srcs: [ ":module-lib-api-stubs-docs" ], |
Anton Hansson | 87c7d28 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 393 | defaults: ["android_defaults_stubs_current"], |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 394 | libs: ["sdk_system_29_android"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 395 | } |
| 396 | |
Anton Hansson | 4f8e749 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 397 | java_library_static { |
| 398 | name: "android_non_updatable_stubs_current", |
| 399 | srcs: [":api-stubs-docs-non-updatable"], |
| 400 | defaults: ["android_defaults_stubs_current"], |
| 401 | libs: ["sdk_system_29_android"], |
| 402 | } |
| 403 | |
| 404 | java_library_static { |
| 405 | name: "android_system_non_updatable_stubs_current", |
| 406 | srcs: [":system-api-stubs-docs-non-updatable"], |
| 407 | defaults: ["android_defaults_stubs_current"], |
| 408 | libs: ["sdk_system_29_android"], |
| 409 | } |
| 410 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 411 | ///////////////////////////////////////////////////////////////////// |
| 412 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 413 | // libraries. |
| 414 | ///////////////////////////////////////////////////////////////////// |
| 415 | |
| 416 | droidstubs { |
| 417 | name: "hwbinder-stubs-docs", |
| 418 | srcs: [ |
| 419 | "core/java/android/os/HidlSupport.java", |
| 420 | "core/java/android/annotation/IntDef.java", |
| 421 | "core/java/android/annotation/IntRange.java", |
| 422 | "core/java/android/annotation/NonNull.java", |
| 423 | "core/java/android/annotation/SystemApi.java", |
| 424 | "core/java/android/os/HidlMemory.java", |
| 425 | "core/java/android/os/HwBinder.java", |
| 426 | "core/java/android/os/HwBlob.java", |
| 427 | "core/java/android/os/HwParcel.java", |
| 428 | "core/java/android/os/IHwBinder.java", |
| 429 | "core/java/android/os/IHwInterface.java", |
| 430 | "core/java/android/os/DeadObjectException.java", |
| 431 | "core/java/android/os/DeadSystemException.java", |
| 432 | "core/java/android/os/NativeHandle.java", |
| 433 | "core/java/android/os/RemoteException.java", |
| 434 | "core/java/android/util/AndroidException.java", |
| 435 | ], |
| 436 | installable: false, |
| 437 | sdk_version: "core_platform", |
| 438 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 439 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 440 | merge_annotations_dirs: [ |
| 441 | "metalava-manual", |
| 442 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 443 | args: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 444 | } |
| 445 | |
| 446 | java_library_static { |
| 447 | name: "hwbinder.stubs", |
| 448 | sdk_version: "core_current", |
| 449 | srcs: [ |
| 450 | ":hwbinder-stubs-docs", |
| 451 | ], |
| 452 | } |
| 453 | |
| 454 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 455 | // api/*-current.txt files for use by modules in other directories |
| 456 | // like the CTS test |
| 457 | ///////////////////////////////////////////////////////////////////// |
| 458 | |
| 459 | filegroup { |
| 460 | name: "frameworks-base-api-current.txt", |
| 461 | srcs: [ |
| 462 | "api/current.txt", |
| 463 | ], |
| 464 | } |
| 465 | |
| 466 | filegroup { |
| 467 | name: "frameworks-base-api-system-current.txt", |
| 468 | srcs: [ |
| 469 | "api/system-current.txt", |
| 470 | ], |
| 471 | } |
| 472 | |
| 473 | filegroup { |
| 474 | name: "frameworks-base-api-system-removed.txt", |
| 475 | srcs: [ |
| 476 | "api/system-removed.txt", |
| 477 | ], |
| 478 | } |