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