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", |
Anton Hansson | 77ff72f | 2021-03-30 10:11:22 +0100 | [diff] [blame] | 45 | srcs: [":framework-non-updatable-stub-sources"], |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 46 | sdk_version: "none", |
| 47 | system_modules: "none", |
| 48 | java_version: "1.8", |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 49 | arg_files: ["core/res/AndroidManifest.xml"], |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 50 | // TODO(b/147699819): remove below aidl includes. |
| 51 | aidl: { |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 52 | local_include_dirs: [ |
| 53 | "apex/media/aidl/stable", |
Remi NGUYEN VAN | c15d99e | 2021-01-28 13:37:03 +0900 | [diff] [blame] | 54 | // TODO: move to include-dirs for packages/modules/Connectivity when this moves out of |
| 55 | // frameworks/base |
| 56 | "packages/Connectivity/framework/aidl-export", |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 57 | "telephony/java", |
| 58 | ], |
Chen Xu | 546ce5e | 2020-01-10 08:38:31 -0800 | [diff] [blame] | 59 | }, |
Jiyong Park | c0f8a28 | 2020-09-29 13:43:00 +0900 | [diff] [blame] | 60 | // These are libs from framework-internal-utils that are required (i.e. being referenced) |
| 61 | // from framework-non-updatable-sources. Add more here when there's a need. |
| 62 | // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular |
| 63 | // dependencies gets bigger. |
| 64 | libs: [ |
| 65 | "android.hardware.cas-V1.2-java", |
| 66 | "android.hardware.health-V1.0-java-constants", |
| 67 | "android.hardware.radio-V1.5-java", |
Jayachandran C | 0f14f81 | 2020-08-10 10:58:23 -0700 | [diff] [blame] | 68 | "android.hardware.radio-V1.6-java", |
Jiyong Park | c0f8a28 | 2020-09-29 13:43:00 +0900 | [diff] [blame] | 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", |
| 73 | "android.hardware.usb-V1.0-java-constants", |
| 74 | "android.hardware.usb-V1.1-java-constants", |
| 75 | "android.hardware.usb.gadget-V1.0-java", |
| 76 | "android.hardware.vibrator-V1.3-java", |
| 77 | "framework-protos", |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 78 | "stable.core.platform.api.stubs", |
Anton Hansson | ce21e28 | 2021-02-05 11:38:30 +0000 | [diff] [blame] | 79 | // There are a few classes from modules used by the core that |
| 80 | // need to be resolved by metalava. We use a prebuilt stub of the |
| 81 | // full sdk to ensure we can resolve them. If a new class gets added, |
| 82 | // the prebuilts/sdk/current needs to be updated. |
| 83 | "sdk_system_current_android", |
Anton Hansson | b7d532e | 2021-02-05 11:40:25 +0000 | [diff] [blame] | 84 | // NOTE: The below can be removed once the prebuilt stub contains IKE. |
| 85 | "sdk_system_current_android.net.ipsec.ike", |
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", |
Anton Hansson | ce55623 | 2021-01-22 16:40:06 +0000 | [diff] [blame] | 114 | baseline_file: ":android-incompatibilities.api.public.latest", |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 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 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 121 | dists: [ |
| 122 | { |
| 123 | targets: ["sdk", "win_sdk"], |
| 124 | dir: "apistubs/android/public/api", |
| 125 | dest: "android-non-updatable.txt", |
| 126 | tag: ".api.txt", |
| 127 | }, |
| 128 | { |
| 129 | targets: ["sdk", "win_sdk"], |
| 130 | dir: "apistubs/android/public/api", |
| 131 | dest: "android-non-updatable-removed.txt", |
| 132 | tag: ".removed-api.txt", |
| 133 | }, |
| 134 | ], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 135 | } |
| 136 | |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 137 | priv_apps = |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 138 | " --show-annotation android.annotation.SystemApi\\(" + |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 139 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
| 140 | "\\)" |
| 141 | |
| 142 | priv_apps_in_stubs = |
Makoto Onuki | a13287f | 2020-07-10 12:05:21 -0700 | [diff] [blame] | 143 | " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 144 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 145 | "\\)" |
| 146 | |
| 147 | test = " --show-annotation android.annotation.TestApi" |
| 148 | |
| 149 | module_libs = |
| 150 | " --show-annotation android.annotation.SystemApi\\(" + |
| 151 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
| 152 | "\\)" |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 153 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 154 | droidstubs { |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 155 | name: "system-api-stubs-docs-non-updatable", |
| 156 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 157 | args: metalava_framework_docs_args + priv_apps, |
| 158 | check_api: { |
| 159 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 160 | api_file: "core/api/system-current.txt", |
| 161 | removed_api_file: "core/api/system-removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 162 | }, |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 163 | last_released: { |
| 164 | api_file: ":android-non-updatable.api.system.latest", |
| 165 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
Anton Hansson | ce55623 | 2021-01-22 16:40:06 +0000 | [diff] [blame] | 166 | baseline_file: ":android-incompatibilities.api.system.latest" |
Anton Hansson | 3258a47 | 2020-10-05 16:23:27 +0100 | [diff] [blame] | 167 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 168 | api_lint: { |
| 169 | enabled: true, |
| 170 | new_since: ":android-non-updatable.api.system.latest", |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 171 | baseline_file: "core/api/system-lint-baseline.txt", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 172 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 173 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 174 | dists: [ |
| 175 | { |
| 176 | targets: ["sdk", "win_sdk"], |
| 177 | dir: "apistubs/android/system/api", |
| 178 | dest: "android-non-updatable.txt", |
| 179 | tag: ".api.txt", |
| 180 | }, |
| 181 | { |
| 182 | targets: ["sdk", "win_sdk"], |
| 183 | dir: "apistubs/android/system/api", |
| 184 | dest: "android-non-updatable-removed.txt", |
| 185 | tag: ".removed-api.txt", |
| 186 | }, |
| 187 | ], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | droidstubs { |
Anton Hansson | 552ba2c | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 191 | name: "test-api-stubs-docs-non-updatable", |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 192 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 193 | args: metalava_framework_docs_args + test + priv_apps_in_stubs, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 194 | check_api: { |
| 195 | current: { |
Anton Hansson | 552ba2c | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 196 | api_file: "core/api/test-current.txt", |
| 197 | removed_api_file: "core/api/test-removed.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 198 | }, |
| 199 | api_lint: { |
| 200 | enabled: true, |
Anton Hansson | 552ba2c | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 201 | baseline_file: "core/api/test-lint-baseline.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 202 | }, |
| 203 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 204 | dists: [ |
| 205 | { |
| 206 | targets: ["sdk", "win_sdk"], |
| 207 | dir: "apistubs/android/test/api", |
| 208 | dest: "android.txt", |
| 209 | tag: ".api.txt", |
| 210 | }, |
| 211 | { |
| 212 | targets: ["sdk", "win_sdk"], |
| 213 | dir: "apistubs/android/test/api", |
| 214 | dest: "removed.txt", |
| 215 | tag: ".removed-api.txt", |
| 216 | }, |
| 217 | { |
| 218 | targets: ["sdk", "win_sdk"], |
| 219 | dir: "apistubs/android/test/api", |
| 220 | dest: "android-non-updatable.txt", |
| 221 | tag: ".api.txt", |
| 222 | }, |
| 223 | { |
| 224 | targets: ["sdk", "win_sdk"], |
| 225 | dir: "apistubs/android/test/api", |
| 226 | dest: "android-non-updatable-removed.txt", |
| 227 | tag: ".removed-api.txt", |
| 228 | }, |
| 229 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 230 | } |
| 231 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 232 | droidstubs { |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 233 | name: "module-lib-api-stubs-docs-non-updatable", |
| 234 | defaults: ["metalava-non-updatable-api-stubs-default"], |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 235 | args: metalava_framework_docs_args + priv_apps_in_stubs + module_libs, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 236 | check_api: { |
| 237 | current: { |
Anton Hansson | 7bfceb8 | 2020-10-29 18:59:10 +0000 | [diff] [blame] | 238 | api_file: "core/api/module-lib-current.txt", |
| 239 | removed_api_file: "core/api/module-lib-removed.txt", |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 240 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 241 | last_released: { |
| 242 | api_file: ":android-non-updatable.api.module-lib.latest", |
| 243 | removed_api_file: ":android-non-updatable-removed.api.module-lib.latest", |
| 244 | }, |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 245 | api_lint: { |
| 246 | enabled: true, |
| 247 | new_since: ":android-non-updatable.api.module-lib.latest", |
| 248 | }, |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 249 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 250 | dists: [ |
| 251 | { |
| 252 | targets: ["sdk", "win_sdk"], |
| 253 | dir: "apistubs/android/module-lib/api", |
| 254 | dest: "android-non-updatable.txt", |
| 255 | tag: ".api.txt", |
| 256 | }, |
| 257 | { |
| 258 | targets: ["sdk", "win_sdk"], |
| 259 | dir: "apistubs/android/module-lib/api", |
| 260 | dest: "android-non-updatable-removed.txt", |
| 261 | tag: ".removed-api.txt", |
| 262 | }, |
| 263 | ], |
Anton Hansson | 7f6823e | 2020-06-04 15:09:36 +0100 | [diff] [blame] | 264 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 265 | |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 266 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 267 | // android_*_stubs_current modules are the stubs libraries compiled |
Anton Hansson | 1c58ffc | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 268 | // from stub sources |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 269 | ///////////////////////////////////////////////////////////////////// |
| 270 | |
Anton Hansson | 6603593 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 271 | modules_public_stubs = [ |
| 272 | "android.net.ipsec.ike.stubs", |
| 273 | "art.module.public.api.stubs", |
| 274 | "conscrypt.module.public.api.stubs", |
| 275 | "framework-connectivity.stubs", |
| 276 | "framework-media.stubs", |
| 277 | "framework-mediaprovider.stubs", |
| 278 | "framework-permission.stubs", |
| 279 | "framework-sdkextensions.stubs", |
| 280 | "framework-statsd.stubs", |
| 281 | "framework-tethering.stubs", |
| 282 | "framework-wifi.stubs", |
| 283 | "i18n.module.public.api.stubs", |
| 284 | ] |
| 285 | |
| 286 | modules_system_stubs = [ |
| 287 | "android.net.ipsec.ike.stubs.system", |
| 288 | "art.module.public.api.stubs", // Only has public stubs |
| 289 | "conscrypt.module.public.api.stubs", // Only has public stubs |
| 290 | "framework-connectivity.stubs.system", |
| 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 | "i18n.module.public.api.stubs", // Only has public stubs |
| 299 | ] |
| 300 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 301 | java_defaults { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame^] | 302 | name: "android-non-updatable_defaults_stubs_current", |
| 303 | libs: ["stub-annotations"], |
| 304 | static_libs: ["framework-res-package-jar"], // Export package of framework-res |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 305 | errorprone: { |
| 306 | javacflags: [ |
| 307 | "-XepDisableAllChecks", |
| 308 | ], |
| 309 | }, |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 310 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 311 | system_modules: "none", |
| 312 | java_version: "1.8", |
| 313 | compile_dex: true, |
| 314 | } |
| 315 | |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame^] | 316 | java_library_static { |
| 317 | name: "android-non-updatable.stubs", |
| 318 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 319 | srcs: [":api-stubs-docs-non-updatable"], |
| 320 | libs: modules_public_stubs, |
| 321 | } |
| 322 | |
| 323 | java_library_static { |
| 324 | name: "android-non-updatable.stubs.system", |
| 325 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 326 | srcs: [ ":system-api-stubs-docs-non-updatable" ], |
| 327 | libs: modules_system_stubs, |
| 328 | } |
| 329 | |
| 330 | java_library_static { |
| 331 | name: "android-non-updatable.stubs.module_lib", |
| 332 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 333 | srcs: [":module-lib-api-stubs-docs-non-updatable"], |
| 334 | libs: [ |
| 335 | "sdk_system_current_android", |
| 336 | // NOTE: The below can be removed once the prebuilt stub contains IKE. |
| 337 | "sdk_system_current_android.net.ipsec.ike", |
| 338 | ], |
| 339 | } |
| 340 | |
| 341 | java_library_static { |
| 342 | name: "android-non-updatable.stubs.test", |
| 343 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 344 | srcs: [":test-api-stubs-docs-non-updatable"], |
| 345 | libs: modules_system_stubs, |
| 346 | } |
| 347 | |
| 348 | java_defaults { |
| 349 | name: "android_defaults_stubs_current", |
| 350 | static_libs: ["art-notices-for-framework-stubs-jar"], // License notices from art module |
| 351 | sdk_version: "none", |
| 352 | system_modules: "none", |
| 353 | java_version: "1.8", |
| 354 | compile_dex: true, |
| 355 | } |
| 356 | |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 357 | java_defaults { |
| 358 | name: "android_stubs_dists_default", |
| 359 | dist: { |
| 360 | targets: ["sdk", "win_sdk"], |
| 361 | tag: ".jar", |
| 362 | dest: "android.jar", |
| 363 | }, |
| 364 | } |
| 365 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 366 | java_library_static { |
Anton Hansson | 3a8e036 | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 367 | name: "android_stubs_current", |
Anton Hansson | 6603593 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 368 | static_libs: modules_public_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame^] | 369 | "android-non-updatable.stubs", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 370 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 371 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 372 | defaults: ["android_defaults_stubs_current"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 373 | } |
| 374 | |
| 375 | java_library_static { |
Anton Hansson | 3a8e036 | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 376 | name: "android_system_stubs_current", |
Anton Hansson | 6603593 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 377 | static_libs: modules_system_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame^] | 378 | "android-non-updatable.stubs.system", |
Anton Hansson | 33ea999 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 379 | "private-stub-annotations-jar", |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 380 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 381 | defaults: [ |
| 382 | "android_defaults_stubs_current", |
| 383 | "android_stubs_dists_default", |
| 384 | ], |
| 385 | dist: { |
| 386 | dir: "apistubs/android/system", |
| 387 | }, |
| 388 | dists: [ |
| 389 | { |
| 390 | // Legacy dist path |
| 391 | targets: ["sdk", "win_sdk"], |
| 392 | tag: ".jar", |
| 393 | dest: "android_system.jar", |
| 394 | }, |
| 395 | ], |
Anton Hansson | 912622f | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 396 | } |
| 397 | |
| 398 | java_library_static { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 399 | name: "android_test_stubs_current", |
Anton Hansson | 6603593 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 400 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 401 | // the SystemApi of framework-non-updatable-sources. |
| 402 | static_libs: modules_system_stubs + [ |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame^] | 403 | "android-non-updatable.stubs.test", |
Anton Hansson | 7110ae7 | 2020-10-15 17:23:35 +0100 | [diff] [blame] | 404 | "private-stub-annotations-jar", |
| 405 | ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 406 | defaults: [ |
| 407 | "android_defaults_stubs_current", |
| 408 | "android_stubs_dists_default", |
| 409 | ], |
| 410 | dist: { |
| 411 | dir: "apistubs/android/test", |
| 412 | }, |
| 413 | dists: [ |
| 414 | { |
| 415 | // Legacy dist path |
| 416 | targets: ["sdk", "win_sdk"], |
| 417 | tag: ".jar", |
| 418 | dest: "android_test.jar", |
| 419 | }, |
| 420 | ], |
Jiyong Park | 2e6cdcc | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 421 | } |
| 422 | |
| 423 | java_library_static { |
Anton Hansson | 9c4bbe9 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 424 | name: "android_module_lib_stubs_current", |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 425 | defaults: [ |
| 426 | "android_defaults_stubs_current", |
| 427 | "android_stubs_dists_default", |
| 428 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame^] | 429 | static_libs: [ |
| 430 | "android-non-updatable.stubs.module_lib", |
| 431 | "art.module.public.api.stubs", |
Anton Hansson | b7d532e | 2021-02-05 11:40:25 +0000 | [diff] [blame] | 432 | ], |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 433 | dist: { |
| 434 | dir: "apistubs/android/module-lib", |
| 435 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 436 | } |
| 437 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 438 | ///////////////////////////////////////////////////////////////////// |
| 439 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 440 | // libraries. |
| 441 | ///////////////////////////////////////////////////////////////////// |
| 442 | |
| 443 | droidstubs { |
| 444 | name: "hwbinder-stubs-docs", |
| 445 | srcs: [ |
| 446 | "core/java/android/os/HidlSupport.java", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 447 | "core/java/android/os/HidlMemory.java", |
| 448 | "core/java/android/os/HwBinder.java", |
| 449 | "core/java/android/os/HwBlob.java", |
| 450 | "core/java/android/os/HwParcel.java", |
| 451 | "core/java/android/os/IHwBinder.java", |
| 452 | "core/java/android/os/IHwInterface.java", |
| 453 | "core/java/android/os/DeadObjectException.java", |
| 454 | "core/java/android/os/DeadSystemException.java", |
| 455 | "core/java/android/os/NativeHandle.java", |
| 456 | "core/java/android/os/RemoteException.java", |
| 457 | "core/java/android/util/AndroidException.java", |
| 458 | ], |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 459 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 460 | installable: false, |
| 461 | sdk_version: "core_platform", |
| 462 | annotations_enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 463 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 464 | merge_annotations_dirs: [ |
| 465 | "metalava-manual", |
| 466 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 467 | args: priv_apps, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 468 | } |
| 469 | |
| 470 | java_library_static { |
| 471 | name: "hwbinder.stubs", |
| 472 | sdk_version: "core_current", |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 473 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 474 | srcs: [ |
| 475 | ":hwbinder-stubs-docs", |
| 476 | ], |
| 477 | } |