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