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 | ///////////////////////////////////////////////////////////////////// |
Anton Hansson | 51861e7 | 2020-11-13 09:55:29 +0000 | [diff] [blame] | 27 | // These modules provide source files for the stub libraries |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 28 | ///////////////////////////////////////////////////////////////////// |
| 29 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 30 | droidstubs { |
| 31 | name: "api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 32 | defaults: [ |
| 33 | "android-non-updatable-stubs-defaults", |
| 34 | "module-classpath-stubs-defaults", |
| 35 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 36 | args: metalava_framework_docs_args, |
| 37 | check_api: { |
| 38 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 39 | api_file: "core/api/current.txt", |
| 40 | removed_api_file: "core/api/removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 41 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 42 | last_released: { |
| 43 | api_file: ":android-non-updatable.api.public.latest", |
| 44 | removed_api_file: ":android-non-updatable-removed.api.public.latest", |
Anton Hansson | 7f3393d | 2021-04-12 11:56:53 +0100 | [diff] [blame] | 45 | baseline_file: ":android-non-updatable-incompatibilities.api.public.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 46 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 47 | api_lint: { |
| 48 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 49 | new_since: ":android.api.public.latest", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 50 | }, |
| 51 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 52 | dists: [ |
| 53 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 54 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 55 | dir: "apistubs/android/public/api", |
| 56 | dest: "android-non-updatable.txt", |
| 57 | tag: ".api.txt", |
| 58 | }, |
| 59 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 60 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 61 | dir: "apistubs/android/public/api", |
| 62 | dest: "android-non-updatable-removed.txt", |
| 63 | tag: ".removed-api.txt", |
| 64 | }, |
| 65 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 66 | } |
| 67 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 68 | priv_apps = " --show-annotation android.annotation.SystemApi\\(" + |
| 69 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 70 | "\\)" |
| 71 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 72 | priv_apps_in_stubs = " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 73 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 74 | "\\)" |
| 75 | |
| 76 | test = " --show-annotation android.annotation.TestApi" |
| 77 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 78 | module_libs = " --show-annotation android.annotation.SystemApi\\(" + |
| 79 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 80 | "\\)" |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 81 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 82 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 83 | name: "system-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 84 | defaults: [ |
| 85 | "android-non-updatable-stubs-defaults", |
| 86 | "module-classpath-stubs-defaults", |
| 87 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 88 | args: metalava_framework_docs_args + priv_apps, |
| 89 | check_api: { |
| 90 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 91 | api_file: "core/api/system-current.txt", |
| 92 | removed_api_file: "core/api/system-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 93 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 94 | last_released: { |
| 95 | api_file: ":android-non-updatable.api.system.latest", |
| 96 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 97 | baseline_file: ":android-non-updatable-incompatibilities.api.system.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 98 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 99 | api_lint: { |
| 100 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 101 | new_since: ":android.api.system.latest", |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 102 | baseline_file: "core/api/system-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 103 | }, |
| 104 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 105 | dists: [ |
| 106 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 107 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 108 | dir: "apistubs/android/system/api", |
| 109 | dest: "android-non-updatable.txt", |
| 110 | tag: ".api.txt", |
| 111 | }, |
| 112 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 113 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 114 | dir: "apistubs/android/system/api", |
| 115 | dest: "android-non-updatable-removed.txt", |
| 116 | tag: ".removed-api.txt", |
| 117 | }, |
| 118 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | droidstubs { |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 122 | name: "test-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 123 | defaults: [ |
| 124 | "android-non-updatable-stubs-defaults", |
| 125 | "module-classpath-stubs-defaults", |
| 126 | ], |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 127 | args: metalava_framework_docs_args + test + priv_apps_in_stubs, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 128 | check_api: { |
| 129 | current: { |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 130 | api_file: "core/api/test-current.txt", |
| 131 | removed_api_file: "core/api/test-removed.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 132 | }, |
| 133 | api_lint: { |
| 134 | enabled: true, |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 135 | baseline_file: "core/api/test-lint-baseline.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 136 | }, |
| 137 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 138 | dists: [ |
| 139 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 140 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 141 | dir: "apistubs/android/test/api", |
| 142 | dest: "android.txt", |
| 143 | tag: ".api.txt", |
| 144 | }, |
| 145 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 146 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 147 | dir: "apistubs/android/test/api", |
| 148 | dest: "removed.txt", |
| 149 | tag: ".removed-api.txt", |
| 150 | }, |
| 151 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 152 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 153 | dir: "apistubs/android/test/api", |
| 154 | dest: "android-non-updatable.txt", |
| 155 | tag: ".api.txt", |
| 156 | }, |
| 157 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 158 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 159 | dir: "apistubs/android/test/api", |
| 160 | dest: "android-non-updatable-removed.txt", |
| 161 | tag: ".removed-api.txt", |
| 162 | }, |
| 163 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 164 | } |
| 165 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 166 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 167 | name: "module-lib-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 168 | defaults: [ |
| 169 | "android-non-updatable-stubs-defaults", |
| 170 | "module-classpath-stubs-defaults", |
| 171 | ], |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 172 | args: metalava_framework_docs_args + priv_apps_in_stubs + module_libs, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 173 | check_api: { |
| 174 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 175 | api_file: "core/api/module-lib-current.txt", |
| 176 | removed_api_file: "core/api/module-lib-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 177 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 178 | last_released: { |
| 179 | api_file: ":android-non-updatable.api.module-lib.latest", |
| 180 | removed_api_file: ":android-non-updatable-removed.api.module-lib.latest", |
Junyu Lai | 2dbb177 | 2022-01-12 17:38:02 +0000 | [diff] [blame] | 181 | baseline_file: ":android-non-updatable-incompatibilities.api.module-lib.latest", |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 182 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 183 | api_lint: { |
| 184 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 185 | new_since: ":android.api.module-lib.latest", |
Anton Hansson | 1f44941 | 2021-06-04 22:30:52 +0100 | [diff] [blame] | 186 | baseline_file: "core/api/module-lib-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 187 | }, |
| 188 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 189 | dists: [ |
| 190 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 191 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 192 | dir: "apistubs/android/module-lib/api", |
| 193 | dest: "android-non-updatable.txt", |
| 194 | tag: ".api.txt", |
| 195 | }, |
| 196 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 197 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 198 | dir: "apistubs/android/module-lib/api", |
| 199 | dest: "android-non-updatable-removed.txt", |
| 200 | tag: ".removed-api.txt", |
| 201 | }, |
| 202 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 203 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 204 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 205 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 206 | // android_*_stubs_current modules are the stubs libraries compiled |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 207 | // from stub sources |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 208 | ///////////////////////////////////////////////////////////////////// |
| 209 | |
| 210 | java_defaults { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 211 | name: "android-non-updatable_defaults_stubs_current", |
| 212 | libs: ["stub-annotations"], |
| 213 | static_libs: ["framework-res-package-jar"], // Export package of framework-res |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 214 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 215 | system_modules: "none", |
| 216 | java_version: "1.8", |
| 217 | compile_dex: true, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 218 | dist: { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 219 | targets: ["sdk"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 220 | tag: ".jar", |
| 221 | dest: "android-non-updatable.jar", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 222 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 223 | defaults_visibility: ["//visibility:private"], |
| 224 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 225 | } |
| 226 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 227 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 228 | name: "android-non-updatable.stubs", |
| 229 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 230 | srcs: [":api-stubs-docs-non-updatable"], |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 231 | libs: ["all-modules-public-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 232 | dist: { |
| 233 | dir: "apistubs/android/public", |
| 234 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 235 | } |
| 236 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 237 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 238 | name: "android-non-updatable.stubs.system", |
| 239 | defaults: ["android-non-updatable_defaults_stubs_current"], |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 240 | srcs: [":system-api-stubs-docs-non-updatable"], |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 241 | libs: ["all-modules-system-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 242 | dist: { |
| 243 | dir: "apistubs/android/system", |
| 244 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 245 | } |
| 246 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 247 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 248 | name: "android-non-updatable.stubs.module_lib", |
| 249 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 250 | srcs: [":module-lib-api-stubs-docs-non-updatable"], |
| 251 | libs: [ |
markchien | cd813a3 | 2021-11-11 00:42:55 +0800 | [diff] [blame] | 252 | "sdk_module-lib_current_framework-tethering", |
Roopa Sattiraju | 86058b6 | 2022-01-20 10:05:19 -0800 | [diff] [blame] | 253 | "sdk_public_current_framework-bluetooth", |
| 254 | // NOTE: The below can be removed once the prebuilt stub contains bluetooth. |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 255 | "sdk_system_current_android", |
| 256 | // NOTE: The below can be removed once the prebuilt stub contains IKE. |
| 257 | "sdk_system_current_android.net.ipsec.ike", |
| 258 | ], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 259 | dist: { |
| 260 | dir: "apistubs/android/module-lib", |
| 261 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 262 | } |
| 263 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 264 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 265 | name: "android-non-updatable.stubs.test", |
| 266 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 267 | srcs: [":test-api-stubs-docs-non-updatable"], |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 268 | libs: ["all-modules-system-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 269 | dist: { |
| 270 | dir: "apistubs/android/test", |
| 271 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 272 | } |
| 273 | |
| 274 | java_defaults { |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 275 | name: "android_stubs_dists_default", |
| 276 | dist: { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 277 | targets: ["sdk"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 278 | tag: ".jar", |
| 279 | dest: "android.jar", |
| 280 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 281 | defaults_visibility: ["//frameworks/base/services"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 282 | } |
| 283 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 284 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 285 | name: "android_stubs_current", |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 286 | static_libs: [ |
| 287 | "all-modules-public-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 288 | "android-non-updatable.stubs", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 289 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 290 | ], |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 291 | defaults: ["android.jar_defaults"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 292 | } |
| 293 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 294 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 295 | name: "android_system_stubs_current", |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 296 | static_libs: [ |
| 297 | "all-modules-system-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 298 | "android-non-updatable.stubs.system", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 299 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 300 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 301 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 302 | "android.jar_defaults", |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 303 | "android_stubs_dists_default", |
| 304 | ], |
| 305 | dist: { |
| 306 | dir: "apistubs/android/system", |
| 307 | }, |
| 308 | dists: [ |
| 309 | { |
| 310 | // Legacy dist path |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 311 | targets: ["sdk"], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 312 | tag: ".jar", |
| 313 | dest: "android_system.jar", |
| 314 | }, |
| 315 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 316 | } |
| 317 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 318 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 319 | name: "android_test_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 320 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 321 | // the SystemApi of framework-non-updatable-sources. |
Anton Hansson | c6e9d2f | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 322 | static_libs: [ |
| 323 | "all-modules-system-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 324 | "android-non-updatable.stubs.test", |
Anton Hansson | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame] | 325 | "private-stub-annotations-jar", |
| 326 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 327 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 328 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 329 | "android_stubs_dists_default", |
| 330 | ], |
| 331 | dist: { |
| 332 | dir: "apistubs/android/test", |
| 333 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 334 | } |
| 335 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 336 | java_library { |
Anton Hansson | 1b9cf09 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 337 | name: "android_module_lib_stubs_current", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 338 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 339 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 340 | "android_stubs_dists_default", |
| 341 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 342 | static_libs: [ |
| 343 | "android-non-updatable.stubs.module_lib", |
Victor Chang | 6b107a9 | 2021-06-17 23:49:42 +0100 | [diff] [blame] | 344 | "art.module.public.api.stubs.module_lib", |
Giulio Fiscella | 68a0411 | 2021-11-30 16:32:44 +0000 | [diff] [blame] | 345 | "i18n.module.public.api.stubs", |
Anton Hansson | b7d532e | 2021-02-05 11:40:25 +0000 | [diff] [blame] | 346 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 347 | dist: { |
| 348 | dir: "apistubs/android/module-lib", |
| 349 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 350 | } |
| 351 | |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 352 | java_library { |
| 353 | name: "android_system_server_stubs_current", |
| 354 | defaults: ["android_stubs_dists_default"], |
| 355 | srcs: [":services-non-updatable-stubs"], |
| 356 | installable: false, |
| 357 | static_libs: [ |
| 358 | "android_module_lib_stubs_current", |
| 359 | ], |
| 360 | sdk_version: "none", |
| 361 | system_modules: "none", |
| 362 | java_version: "1.8", |
| 363 | dist: { |
| 364 | dir: "apistubs/android/system-server", |
| 365 | }, |
| 366 | } |
| 367 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 368 | ///////////////////////////////////////////////////////////////////// |
| 369 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 370 | // libraries. |
| 371 | ///////////////////////////////////////////////////////////////////// |
| 372 | |
| 373 | droidstubs { |
| 374 | name: "hwbinder-stubs-docs", |
| 375 | srcs: [ |
| 376 | "core/java/android/os/HidlSupport.java", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 377 | "core/java/android/os/HidlMemory.java", |
| 378 | "core/java/android/os/HwBinder.java", |
| 379 | "core/java/android/os/HwBlob.java", |
| 380 | "core/java/android/os/HwParcel.java", |
| 381 | "core/java/android/os/IHwBinder.java", |
| 382 | "core/java/android/os/IHwInterface.java", |
| 383 | "core/java/android/os/DeadObjectException.java", |
| 384 | "core/java/android/os/DeadSystemException.java", |
| 385 | "core/java/android/os/NativeHandle.java", |
| 386 | "core/java/android/os/RemoteException.java", |
| 387 | "core/java/android/util/AndroidException.java", |
| 388 | ], |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 389 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 390 | installable: false, |
| 391 | sdk_version: "core_platform", |
| 392 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 393 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 394 | merge_annotations_dirs: [ |
| 395 | "metalava-manual", |
| 396 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 397 | args: priv_apps, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 398 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 399 | } |
| 400 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 401 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 402 | name: "hwbinder.stubs", |
| 403 | sdk_version: "core_current", |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 404 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 405 | srcs: [ |
| 406 | ":hwbinder-stubs-docs", |
| 407 | ], |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 408 | visibility: ["//visibility:public"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 409 | } |