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