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"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 125 | arg_files: [ |
| 126 | "core/res/AndroidManifest.xml", |
| 127 | ], |
| 128 | args: metalava_framework_docs_args, |
| 129 | check_api: { |
| 130 | current: { |
| 131 | api_file: "api/current.txt", |
| 132 | removed_api_file: "api/removed.txt", |
| 133 | }, |
| 134 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 135 | api_file: ":android.api.public.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 136 | removed_api_file: ":removed.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 137 | baseline_file: ":public-api-incompatibilities-with-last-released", |
| 138 | }, |
| 139 | api_lint: { |
| 140 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 141 | new_since: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 142 | baseline_file: "api/lint-baseline.txt", |
| 143 | }, |
| 144 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 145 | } |
| 146 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 147 | droidstubs { |
| 148 | name: "api-stubs-docs-non-updatable", |
| 149 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 150 | arg_files: ["core/res/AndroidManifest.xml"], |
| 151 | args: metalava_framework_docs_args, |
| 152 | check_api: { |
| 153 | current: { |
| 154 | api_file: "non-updatable-api/current.txt", |
| 155 | removed_api_file: "non-updatable-api/removed.txt", |
| 156 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 157 | last_released: { |
| 158 | api_file: ":android-non-updatable.api.public.latest", |
| 159 | removed_api_file: ":android-non-updatable-removed.api.public.latest", |
| 160 | baseline_file: ":public-api-incompatibilities-with-last-released", |
| 161 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 162 | api_lint: { |
| 163 | enabled: true, |
| 164 | new_since: ":android-non-updatable.api.public.latest", |
| 165 | }, |
| 166 | }, |
| 167 | } |
| 168 | |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 169 | priv_apps = " " + |
| 170 | "--show-annotation android.annotation.SystemApi\\(" + |
| 171 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 172 | "\\) " |
| 173 | |
| 174 | module_libs = " " + |
| 175 | " --show-annotation android.annotation.SystemApi\\(" + |
| 176 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Makoto Onuki | 41ccbfb | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 177 | "\\)" + |
| 178 | " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 179 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 180 | "\\) " |
| 181 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 182 | droidstubs { |
| 183 | name: "system-api-stubs-docs", |
Anton Hansson | 822cdb3 | 2020-03-06 17:16:06 +0000 | [diff] [blame] | 184 | defaults: ["metalava-full-api-stubs-default"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 185 | arg_files: [ |
| 186 | "core/res/AndroidManifest.xml", |
| 187 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 188 | args: metalava_framework_docs_args + priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 189 | check_api: { |
| 190 | current: { |
| 191 | api_file: "api/system-current.txt", |
| 192 | removed_api_file: "api/system-removed.txt", |
| 193 | }, |
| 194 | last_released: { |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 195 | api_file: ":android.api.system.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 196 | removed_api_file: ":removed.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 197 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 198 | }, |
| 199 | api_lint: { |
| 200 | enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 201 | new_since: ":android.api.system.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 202 | baseline_file: "api/system-lint-baseline.txt", |
| 203 | }, |
| 204 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 208 | name: "system-api-stubs-docs-non-updatable", |
| 209 | defaults: ["metalava-non-updatable-api-stubs-default"], |
| 210 | arg_files: ["core/res/AndroidManifest.xml"], |
| 211 | args: metalava_framework_docs_args + priv_apps, |
| 212 | check_api: { |
| 213 | current: { |
| 214 | api_file: "non-updatable-api/system-current.txt", |
| 215 | removed_api_file: "non-updatable-api/system-removed.txt", |
| 216 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 217 | last_released: { |
| 218 | api_file: ":android-non-updatable.api.system.latest", |
| 219 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
| 220 | baseline_file: ":system-api-incompatibilities-with-last-released" |
| 221 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 222 | api_lint: { |
| 223 | enabled: true, |
| 224 | new_since: ":android-non-updatable.api.system.latest", |
| 225 | baseline_file: "non-updatable-api/system-lint-baseline.txt", |
| 226 | }, |
| 227 | }, |
| 228 | } |
| 229 | |
| 230 | droidstubs { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 231 | name: "test-api-stubs-docs", |
Anton Hansson | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame^] | 232 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 233 | arg_files: [ |
| 234 | "core/res/AndroidManifest.xml", |
| 235 | ], |
Anton Hansson | a2b3497 | 2020-10-09 10:13:51 +0100 | [diff] [blame] | 236 | args: metalava_framework_docs_args |
| 237 | + " --show-annotation android.annotation.TestApi" |
| 238 | + " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" |
| 239 | + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" |
| 240 | + "\\)", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 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 | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame^] | 425 | static_libs: [ |
| 426 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 427 | // the SystemApi of framework-non-updatable-sources. |
| 428 | "conscrypt.module.public.api.stubs", |
| 429 | "framework-appsearch.stubs.system", |
| 430 | "framework-graphics.stubs.system", |
| 431 | "framework-media.stubs.system", |
| 432 | "framework-mediaprovider.stubs.system", |
| 433 | "framework-permission.stubs.system", |
| 434 | "framework-sdkextensions.stubs.system", |
| 435 | "framework-statsd.stubs.system", |
| 436 | "framework-tethering.stubs.system", |
| 437 | "framework-wifi.stubs.system", |
| 438 | "private-stub-annotations-jar", |
| 439 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 440 | defaults: [ |
| 441 | "android_defaults_stubs_current", |
| 442 | "android_stubs_dists_default", |
| 443 | ], |
| 444 | dist: { |
| 445 | dir: "apistubs/android/test", |
| 446 | }, |
| 447 | dists: [ |
| 448 | { |
| 449 | // Legacy dist path |
| 450 | targets: ["sdk", "win_sdk"], |
| 451 | tag: ".jar", |
| 452 | dest: "android_test.jar", |
| 453 | }, |
| 454 | ], |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 455 | } |
| 456 | |
| 457 | java_library_static { |
Anton Hansson | 1b9cf09 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 458 | name: "android_module_lib_stubs_current", |
Makoto Onuki | f4a486e | 2020-07-15 10:38:04 -0700 | [diff] [blame] | 459 | srcs: [ ":module-lib-api-stubs-docs-non-updatable" ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 460 | defaults: [ |
| 461 | "android_defaults_stubs_current", |
| 462 | "android_stubs_dists_default", |
| 463 | ], |
Anton Hansson | 394febc | 2020-04-14 16:35:36 +0100 | [diff] [blame] | 464 | libs: ["sdk_system_29_android"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 465 | dist: { |
| 466 | dir: "apistubs/android/module-lib", |
| 467 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 468 | } |
| 469 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 470 | java_library_static { |
| 471 | name: "android_non_updatable_stubs_current", |
| 472 | srcs: [":api-stubs-docs-non-updatable"], |
| 473 | defaults: ["android_defaults_stubs_current"], |
| 474 | libs: ["sdk_system_29_android"], |
| 475 | } |
| 476 | |
| 477 | java_library_static { |
| 478 | name: "android_system_non_updatable_stubs_current", |
| 479 | srcs: [":system-api-stubs-docs-non-updatable"], |
| 480 | defaults: ["android_defaults_stubs_current"], |
| 481 | libs: ["sdk_system_29_android"], |
| 482 | } |
| 483 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 484 | ///////////////////////////////////////////////////////////////////// |
| 485 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 486 | // libraries. |
| 487 | ///////////////////////////////////////////////////////////////////// |
| 488 | |
| 489 | droidstubs { |
| 490 | name: "hwbinder-stubs-docs", |
| 491 | srcs: [ |
| 492 | "core/java/android/os/HidlSupport.java", |
| 493 | "core/java/android/annotation/IntDef.java", |
| 494 | "core/java/android/annotation/IntRange.java", |
| 495 | "core/java/android/annotation/NonNull.java", |
| 496 | "core/java/android/annotation/SystemApi.java", |
| 497 | "core/java/android/os/HidlMemory.java", |
| 498 | "core/java/android/os/HwBinder.java", |
| 499 | "core/java/android/os/HwBlob.java", |
| 500 | "core/java/android/os/HwParcel.java", |
| 501 | "core/java/android/os/IHwBinder.java", |
| 502 | "core/java/android/os/IHwInterface.java", |
| 503 | "core/java/android/os/DeadObjectException.java", |
| 504 | "core/java/android/os/DeadSystemException.java", |
| 505 | "core/java/android/os/NativeHandle.java", |
| 506 | "core/java/android/os/RemoteException.java", |
| 507 | "core/java/android/util/AndroidException.java", |
| 508 | ], |
| 509 | installable: false, |
| 510 | sdk_version: "core_platform", |
| 511 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 512 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 513 | merge_annotations_dirs: [ |
| 514 | "metalava-manual", |
| 515 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 516 | args: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 517 | } |
| 518 | |
| 519 | java_library_static { |
| 520 | name: "hwbinder.stubs", |
| 521 | sdk_version: "core_current", |
| 522 | srcs: [ |
| 523 | ":hwbinder-stubs-docs", |
| 524 | ], |
| 525 | } |