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