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