blob: 32101c79124284877a3cb7e5411b323b12185297 [file] [log] [blame]
Jiyong Park7fb4b182019-12-20 14:35:43 +09001// 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 Hansson2feb3f12020-11-13 11:44:32 +000019// - The metalava conversion is done by droidstub modules
20// - The javac compilation is done by java_library modules
21//
Jiyong Park7fb4b182019-12-20 14:35:43 +090022// The metalava conversion is also responsible for creating API signature files
Anton Hansson2feb3f12020-11-13 11:44:32 +000023// and comparing them against the checked in API signature, and also checking compatibility
24// with the latest frozen API signature.
Jiyong Park7fb4b182019-12-20 14:35:43 +090025
26/////////////////////////////////////////////////////////////////////
Anton Hansson51861e72020-11-13 09:55:29 +000027// These modules provide source files for the stub libraries
Jiyong Park7fb4b182019-12-20 14:35:43 +090028/////////////////////////////////////////////////////////////////////
29
Anton Hansson76d3db42020-04-09 14:16:37 +010030droidstubs {
31 name: "api-stubs-docs-non-updatable",
Anton Hansson9dce8322022-01-24 14:14:33 +000032 defaults: [
33 "android-non-updatable-stubs-defaults",
34 "module-classpath-stubs-defaults",
35 ],
Anton Hansson76d3db42020-04-09 14:16:37 +010036 args: metalava_framework_docs_args,
37 check_api: {
38 current: {
Anton Hansson6cbaff22020-10-29 15:28:19 +000039 api_file: "core/api/current.txt",
40 removed_api_file: "core/api/removed.txt",
Anton Hansson76d3db42020-04-09 14:16:37 +010041 },
Anton Hansson37e102e2020-10-05 16:42:40 +010042 last_released: {
43 api_file: ":android-non-updatable.api.public.latest",
44 removed_api_file: ":android-non-updatable-removed.api.public.latest",
Anton Hansson7f3393d2021-04-12 11:56:53 +010045 baseline_file: ":android-non-updatable-incompatibilities.api.public.latest",
Anton Hansson37e102e2020-10-05 16:42:40 +010046 },
Anton Hansson76d3db42020-04-09 14:16:37 +010047 api_lint: {
48 enabled: true,
Anton Hansson4f90aa52021-06-04 22:23:59 +010049 new_since: ":android.api.public.latest",
Anton Hansson76d3db42020-04-09 14:16:37 +010050 },
51 },
Anton Hansson85785fe2021-01-20 20:23:34 +000052 dists: [
53 {
Anton Hanssondd8ef672022-01-04 08:53:19 +000054 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +000055 dir: "apistubs/android/public/api",
56 dest: "android-non-updatable.txt",
57 tag: ".api.txt",
58 },
59 {
Anton Hanssondd8ef672022-01-04 08:53:19 +000060 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +000061 dir: "apistubs/android/public/api",
62 dest: "android-non-updatable-removed.txt",
63 tag: ".removed-api.txt",
64 },
65 ],
Anton Hansson76d3db42020-04-09 14:16:37 +010066}
67
Anton Hansson240ee482021-04-14 12:52:00 +010068priv_apps = " --show-annotation android.annotation.SystemApi\\(" +
69 "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
Anton Hansson2feb3f12020-11-13 11:44:32 +000070 "\\)"
71
Anton Hansson240ee482021-04-14 12:52:00 +010072priv_apps_in_stubs = " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" +
73 "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
Anton Hansson2feb3f12020-11-13 11:44:32 +000074 "\\)"
75
76test = " --show-annotation android.annotation.TestApi"
77
Anton Hansson240ee482021-04-14 12:52:00 +010078module_libs = " --show-annotation android.annotation.SystemApi\\(" +
79 "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
Anton Hansson2feb3f12020-11-13 11:44:32 +000080 "\\)"
Anton Hansson81969c22020-02-03 20:45:56 +000081
Jiyong Park7fb4b182019-12-20 14:35:43 +090082droidstubs {
Anton Hansson76d3db42020-04-09 14:16:37 +010083 name: "system-api-stubs-docs-non-updatable",
Anton Hansson9dce8322022-01-24 14:14:33 +000084 defaults: [
85 "android-non-updatable-stubs-defaults",
86 "module-classpath-stubs-defaults",
87 ],
Anton Hansson76d3db42020-04-09 14:16:37 +010088 args: metalava_framework_docs_args + priv_apps,
89 check_api: {
90 current: {
Anton Hansson6cbaff22020-10-29 15:28:19 +000091 api_file: "core/api/system-current.txt",
92 removed_api_file: "core/api/system-removed.txt",
Anton Hansson76d3db42020-04-09 14:16:37 +010093 },
Anton Hansson37e102e2020-10-05 16:42:40 +010094 last_released: {
95 api_file: ":android-non-updatable.api.system.latest",
96 removed_api_file: ":android-non-updatable-removed.api.system.latest",
Anton Hansson240ee482021-04-14 12:52:00 +010097 baseline_file: ":android-non-updatable-incompatibilities.api.system.latest",
Anton Hansson37e102e2020-10-05 16:42:40 +010098 },
Anton Hansson76d3db42020-04-09 14:16:37 +010099 api_lint: {
100 enabled: true,
Anton Hansson4f90aa52021-06-04 22:23:59 +0100101 new_since: ":android.api.system.latest",
Anton Hansson6cbaff22020-10-29 15:28:19 +0000102 baseline_file: "core/api/system-lint-baseline.txt",
Anton Hansson76d3db42020-04-09 14:16:37 +0100103 },
104 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000105 dists: [
106 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000107 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000108 dir: "apistubs/android/system/api",
109 dest: "android-non-updatable.txt",
110 tag: ".api.txt",
111 },
112 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000113 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000114 dir: "apistubs/android/system/api",
115 dest: "android-non-updatable-removed.txt",
116 tag: ".removed-api.txt",
117 },
118 ],
Anton Hansson76d3db42020-04-09 14:16:37 +0100119}
120
121droidstubs {
Anton Hansson022aac52020-11-05 10:45:13 +0000122 name: "test-api-stubs-docs-non-updatable",
Anton Hansson9dce8322022-01-24 14:14:33 +0000123 defaults: [
124 "android-non-updatable-stubs-defaults",
125 "module-classpath-stubs-defaults",
126 ],
Anton Hansson2feb3f12020-11-13 11:44:32 +0000127 args: metalava_framework_docs_args + test + priv_apps_in_stubs,
Jiyong Park7fb4b182019-12-20 14:35:43 +0900128 check_api: {
129 current: {
Anton Hansson022aac52020-11-05 10:45:13 +0000130 api_file: "core/api/test-current.txt",
131 removed_api_file: "core/api/test-removed.txt",
Jiyong Park7fb4b182019-12-20 14:35:43 +0900132 },
133 api_lint: {
134 enabled: true,
Anton Hansson022aac52020-11-05 10:45:13 +0000135 baseline_file: "core/api/test-lint-baseline.txt",
Jiyong Park7fb4b182019-12-20 14:35:43 +0900136 },
137 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000138 dists: [
139 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000140 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000141 dir: "apistubs/android/test/api",
142 dest: "android.txt",
143 tag: ".api.txt",
144 },
145 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000146 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000147 dir: "apistubs/android/test/api",
148 dest: "removed.txt",
149 tag: ".removed-api.txt",
150 },
151 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000152 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000153 dir: "apistubs/android/test/api",
154 dest: "android-non-updatable.txt",
155 tag: ".api.txt",
156 },
157 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000158 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000159 dir: "apistubs/android/test/api",
160 dest: "android-non-updatable-removed.txt",
161 tag: ".removed-api.txt",
162 },
163 ],
Jiyong Park7fb4b182019-12-20 14:35:43 +0900164}
165
Jiyong Parke3095162019-12-20 15:30:28 +0900166droidstubs {
Anton Hansson76d3db42020-04-09 14:16:37 +0100167 name: "module-lib-api-stubs-docs-non-updatable",
Anton Hansson9dce8322022-01-24 14:14:33 +0000168 defaults: [
169 "android-non-updatable-stubs-defaults",
170 "module-classpath-stubs-defaults",
171 ],
Anton Hansson2feb3f12020-11-13 11:44:32 +0000172 args: metalava_framework_docs_args + priv_apps_in_stubs + module_libs,
Anton Hansson76d3db42020-04-09 14:16:37 +0100173 check_api: {
174 current: {
Anton Hansson6cbaff22020-10-29 15:28:19 +0000175 api_file: "core/api/module-lib-current.txt",
176 removed_api_file: "core/api/module-lib-removed.txt",
Anton Hansson76d3db42020-04-09 14:16:37 +0100177 },
Anton Hanssonc3ef1f562020-10-07 14:55:36 +0100178 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 Lai2dbb1772022-01-12 17:38:02 +0000181 baseline_file: ":android-non-updatable-incompatibilities.api.module-lib.latest",
Anton Hanssonc3ef1f562020-10-07 14:55:36 +0100182 },
Anton Hansson76d3db42020-04-09 14:16:37 +0100183 api_lint: {
184 enabled: true,
Anton Hansson4f90aa52021-06-04 22:23:59 +0100185 new_since: ":android.api.module-lib.latest",
Anton Hansson1f449412021-06-04 22:30:52 +0100186 baseline_file: "core/api/module-lib-lint-baseline.txt",
Anton Hansson76d3db42020-04-09 14:16:37 +0100187 },
188 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000189 dists: [
190 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000191 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000192 dir: "apistubs/android/module-lib/api",
193 dest: "android-non-updatable.txt",
194 tag: ".api.txt",
195 },
196 {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000197 targets: ["sdk"],
Anton Hansson85785fe2021-01-20 20:23:34 +0000198 dir: "apistubs/android/module-lib/api",
199 dest: "android-non-updatable-removed.txt",
200 tag: ".removed-api.txt",
201 },
202 ],
Anton Hansson76d3db42020-04-09 14:16:37 +0100203}
Anton Hansson81969c22020-02-03 20:45:56 +0000204
Jiyong Parke3095162019-12-20 15:30:28 +0900205/////////////////////////////////////////////////////////////////////
Jiyong Park7fb4b182019-12-20 14:35:43 +0900206// android_*_stubs_current modules are the stubs libraries compiled
Anton Hansson2feb3f12020-11-13 11:44:32 +0000207// from stub sources
Jiyong Park7fb4b182019-12-20 14:35:43 +0900208/////////////////////////////////////////////////////////////////////
209
210java_defaults {
Anton Hanssonf8f417e2022-03-03 15:14:04 +0000211 name: "android.jar_defaults",
212 sdk_version: "none",
213 system_modules: "none",
214 java_version: "1.8",
215 compile_dex: true,
216 defaults_visibility: ["//visibility:private"],
217 visibility: ["//visibility:public"],
218}
219
220java_defaults {
Anton Hanssona4748cd2021-04-09 10:16:19 +0100221 name: "android-non-updatable_defaults_stubs_current",
222 libs: ["stub-annotations"],
223 static_libs: ["framework-res-package-jar"], // Export package of framework-res
Anton Hanssonfbd32f32020-04-09 14:16:37 +0100224 sdk_version: "none",
Jiyong Park7fb4b182019-12-20 14:35:43 +0900225 system_modules: "none",
226 java_version: "1.8",
227 compile_dex: true,
Anton Hanssona4108912021-04-09 13:40:11 +0100228 dist: {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000229 targets: ["sdk"],
Anton Hanssona4108912021-04-09 13:40:11 +0100230 tag: ".jar",
231 dest: "android-non-updatable.jar",
Anton Hansson240ee482021-04-14 12:52:00 +0100232 },
Anton Hansson86925682021-04-14 14:54:43 +0100233 defaults_visibility: ["//visibility:private"],
234 visibility: ["//visibility:private"],
Jiyong Park7fb4b182019-12-20 14:35:43 +0900235}
236
Neha Pattan2edfc482022-03-02 17:37:23 +0000237java_library {
Anton Hanssona4748cd2021-04-09 10:16:19 +0100238 name: "android-non-updatable.stubs",
239 defaults: ["android-non-updatable_defaults_stubs_current"],
240 srcs: [":api-stubs-docs-non-updatable"],
Anton Hansson04ab8c62022-01-25 15:53:43 +0000241 libs: ["all-modules-public-stubs"],
Anton Hanssona4108912021-04-09 13:40:11 +0100242 dist: {
243 dir: "apistubs/android/public",
244 },
Anton Hanssona4748cd2021-04-09 10:16:19 +0100245}
246
Neha Pattan2edfc482022-03-02 17:37:23 +0000247java_library {
Anton Hanssona4748cd2021-04-09 10:16:19 +0100248 name: "android-non-updatable.stubs.system",
249 defaults: ["android-non-updatable_defaults_stubs_current"],
Anton Hansson240ee482021-04-14 12:52:00 +0100250 srcs: [":system-api-stubs-docs-non-updatable"],
Anton Hansson04ab8c62022-01-25 15:53:43 +0000251 libs: ["all-modules-system-stubs"],
Anton Hanssona4108912021-04-09 13:40:11 +0100252 dist: {
253 dir: "apistubs/android/system",
254 },
Anton Hanssona4748cd2021-04-09 10:16:19 +0100255}
256
Anton Hanssonbbdd64b2021-04-26 18:47:39 +0100257java_library {
Anton Hanssona4748cd2021-04-09 10:16:19 +0100258 name: "android-non-updatable.stubs.module_lib",
259 defaults: ["android-non-updatable_defaults_stubs_current"],
260 srcs: [":module-lib-api-stubs-docs-non-updatable"],
261 libs: [
markchiencd813a32021-11-11 00:42:55 +0800262 "sdk_module-lib_current_framework-tethering",
paulhue074dd22022-02-08 21:23:06 +0800263 "sdk_module-lib_current_framework-connectivity-t",
Roopa Sattiraju8e305772022-01-20 10:05:19 -0800264 "sdk_public_current_framework-bluetooth",
265 // NOTE: The below can be removed once the prebuilt stub contains bluetooth.
Anton Hanssona4748cd2021-04-09 10:16:19 +0100266 "sdk_system_current_android",
267 // NOTE: The below can be removed once the prebuilt stub contains IKE.
268 "sdk_system_current_android.net.ipsec.ike",
269 ],
Anton Hanssona4108912021-04-09 13:40:11 +0100270 dist: {
271 dir: "apistubs/android/module-lib",
272 },
Anton Hanssona4748cd2021-04-09 10:16:19 +0100273}
274
Neha Pattan2edfc482022-03-02 17:37:23 +0000275java_library {
Anton Hanssona4748cd2021-04-09 10:16:19 +0100276 name: "android-non-updatable.stubs.test",
277 defaults: ["android-non-updatable_defaults_stubs_current"],
278 srcs: [":test-api-stubs-docs-non-updatable"],
Anton Hansson04ab8c62022-01-25 15:53:43 +0000279 libs: ["all-modules-system-stubs"],
Anton Hanssona4108912021-04-09 13:40:11 +0100280 dist: {
281 dir: "apistubs/android/test",
282 },
Anton Hanssona4748cd2021-04-09 10:16:19 +0100283}
284
285java_defaults {
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000286 name: "android_stubs_dists_default",
287 dist: {
Anton Hanssondd8ef672022-01-04 08:53:19 +0000288 targets: ["sdk"],
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000289 tag: ".jar",
290 dest: "android.jar",
291 },
Anton Hansson86925682021-04-14 14:54:43 +0100292 defaults_visibility: ["//frameworks/base/services"],
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000293}
294
Neha Pattan2edfc482022-03-02 17:37:23 +0000295java_library {
Anton Hansson65aa6ea2020-11-03 19:35:56 +0000296 name: "android_stubs_current",
Anton Hansson04ab8c62022-01-25 15:53:43 +0000297 static_libs: [
298 "all-modules-public-stubs",
Anton Hanssona4748cd2021-04-09 10:16:19 +0100299 "android-non-updatable.stubs",
Anton Hanssonbf63f942020-05-20 12:06:23 +0100300 "private-stub-annotations-jar",
Anton Hansson76d3db42020-04-09 14:16:37 +0100301 ],
Anton Hansson65057af2021-04-14 18:52:08 +0100302 defaults: ["android.jar_defaults"],
Jiyong Park7fb4b182019-12-20 14:35:43 +0900303}
304
Neha Pattan2edfc482022-03-02 17:37:23 +0000305java_library {
Anton Hansson65aa6ea2020-11-03 19:35:56 +0000306 name: "android_system_stubs_current",
Anton Hansson04ab8c62022-01-25 15:53:43 +0000307 static_libs: [
308 "all-modules-system-stubs",
Anton Hanssona4748cd2021-04-09 10:16:19 +0100309 "android-non-updatable.stubs.system",
Anton Hanssonbf63f942020-05-20 12:06:23 +0100310 "private-stub-annotations-jar",
Anton Hansson76d3db42020-04-09 14:16:37 +0100311 ],
Anton Hanssonc3002e52020-11-18 18:23:55 +0000312 defaults: [
Anton Hansson65057af2021-04-14 18:52:08 +0100313 "android.jar_defaults",
Anton Hanssonc3002e52020-11-18 18:23:55 +0000314 "android_stubs_dists_default",
315 ],
316 dist: {
317 dir: "apistubs/android/system",
318 },
319 dists: [
320 {
321 // Legacy dist path
Anton Hanssondd8ef672022-01-04 08:53:19 +0000322 targets: ["sdk"],
Anton Hanssonc3002e52020-11-18 18:23:55 +0000323 tag: ".jar",
324 dest: "android_system.jar",
325 },
326 ],
Anton Hansson76d3db42020-04-09 14:16:37 +0100327}
328
Neha Pattan2edfc482022-03-02 17:37:23 +0000329java_library {
Jiyong Park7fb4b182019-12-20 14:35:43 +0900330 name: "android_test_stubs_current",
Anton Hansson33b9b852021-04-09 10:12:45 +0100331 // Modules do not have test APIs, but we want to include their SystemApis, like we include
332 // the SystemApi of framework-non-updatable-sources.
Anton Hansson04ab8c62022-01-25 15:53:43 +0000333 static_libs: [
334 "all-modules-system-stubs",
Anton Hanssona4748cd2021-04-09 10:16:19 +0100335 "android-non-updatable.stubs.test",
Anton Hansson7ce31c12020-10-15 18:38:49 +0100336 "private-stub-annotations-jar",
337 ],
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000338 defaults: [
Anton Hansson65057af2021-04-14 18:52:08 +0100339 "android.jar_defaults",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000340 "android_stubs_dists_default",
341 ],
342 dist: {
343 dir: "apistubs/android/test",
344 },
Jiyong Parke3095162019-12-20 15:30:28 +0900345}
346
Anton Hanssonbbdd64b2021-04-26 18:47:39 +0100347java_library {
Anton Hansson1b9cf092020-01-30 12:09:02 +0000348 name: "android_module_lib_stubs_current",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000349 defaults: [
Anton Hansson65057af2021-04-14 18:52:08 +0100350 "android.jar_defaults",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000351 "android_stubs_dists_default",
352 ],
Anton Hanssona4748cd2021-04-09 10:16:19 +0100353 static_libs: [
354 "android-non-updatable.stubs.module_lib",
Victor Chang6b107a92021-06-17 23:49:42 +0100355 "art.module.public.api.stubs.module_lib",
Giulio Fiscella68a04112021-11-30 16:32:44 +0000356 "i18n.module.public.api.stubs",
Anton Hanssonb7d532e2021-02-05 11:40:25 +0000357 ],
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000358 dist: {
359 dir: "apistubs/android/module-lib",
360 },
Jiyong Park7fb4b182019-12-20 14:35:43 +0900361}
362
Andrei Oneafaa271a2021-03-17 13:32:51 +0000363java_library {
364 name: "android_system_server_stubs_current",
365 defaults: ["android_stubs_dists_default"],
366 srcs: [":services-non-updatable-stubs"],
367 installable: false,
368 static_libs: [
369 "android_module_lib_stubs_current",
370 ],
371 sdk_version: "none",
372 system_modules: "none",
373 java_version: "1.8",
374 dist: {
375 dir: "apistubs/android/system-server",
376 },
377}
378
Anton Hansson36bc27c2021-09-14 15:45:13 +0100379////////////////////////////////////////////////////////////////////////
380// api-versions.xml generation, for public and system. This API database
381// also contains the android.test.* APIs.
382////////////////////////////////////////////////////////////////////////
383
384java_library {
385 name: "android_stubs_current_with_test_libs",
386 static_libs: [
387 "android_stubs_current",
388 "android.test.base.stubs",
389 "android.test.mock.stubs",
390 "android.test.runner.stubs",
391 ],
392 defaults: ["android.jar_defaults"],
393 visibility: [
394 "//visibility:override",
395 "//visibility:private",
396 ],
397}
398
399java_library {
400 name: "android_system_stubs_current_with_test_libs",
401 static_libs: [
402 "android_system_stubs_current",
403 "android.test.base.stubs.system",
404 "android.test.mock.stubs.system",
405 "android.test.runner.stubs.system",
406 ],
407 defaults: ["android.jar_defaults"],
408 visibility: [
409 "//visibility:override",
410 "//visibility:private",
411 ],
412}
413
414droidstubs {
415 name: "api_versions_public",
416 srcs: [":android_stubs_current_with_test_libs{.jar}"],
417 generate_stubs: false,
418 api_levels_annotations_enabled: true,
419 api_levels_annotations_dirs: [
420 "sdk-dir",
421 "api-versions-jars-dir",
422 ],
423}
424
425droidstubs {
426 name: "api_versions_system",
427 srcs: [":android_system_stubs_current_with_test_libs{.jar}"],
428 generate_stubs: false,
429 api_levels_annotations_enabled: true,
430 api_levels_annotations_dirs: [
431 "sdk-dir",
432 "api-versions-jars-dir",
433 ],
434 api_levels_sdk_type: "system",
435}
436
Jiyong Park7fb4b182019-12-20 14:35:43 +0900437/////////////////////////////////////////////////////////////////////
438// hwbinder.stubs provides APIs required for building HIDL Java
439// libraries.
440/////////////////////////////////////////////////////////////////////
441
442droidstubs {
443 name: "hwbinder-stubs-docs",
444 srcs: [
445 "core/java/android/os/HidlSupport.java",
Jiyong Park7fb4b182019-12-20 14:35:43 +0900446 "core/java/android/os/HidlMemory.java",
447 "core/java/android/os/HwBinder.java",
448 "core/java/android/os/HwBlob.java",
449 "core/java/android/os/HwParcel.java",
450 "core/java/android/os/IHwBinder.java",
451 "core/java/android/os/IHwInterface.java",
452 "core/java/android/os/DeadObjectException.java",
453 "core/java/android/os/DeadSystemException.java",
454 "core/java/android/os/NativeHandle.java",
455 "core/java/android/os/RemoteException.java",
456 "core/java/android/util/AndroidException.java",
457 ],
Colin Cross037d7fb2021-03-25 17:01:55 -0700458 libs: ["framework-annotations-lib"],
Jiyong Park7fb4b182019-12-20 14:35:43 +0900459 installable: false,
460 sdk_version: "core_platform",
461 annotations_enabled: true,
Anton Hansson48ee95e2020-05-02 17:49:26 +0100462 previous_api: ":android.api.public.latest",
Jiyong Park7fb4b182019-12-20 14:35:43 +0900463 merge_annotations_dirs: [
464 "metalava-manual",
465 ],
Anton Hansson81969c22020-02-03 20:45:56 +0000466 args: priv_apps,
Anton Hansson86925682021-04-14 14:54:43 +0100467 visibility: ["//visibility:private"],
Jiyong Park7fb4b182019-12-20 14:35:43 +0900468}
469
Anton Hanssonbbdd64b2021-04-26 18:47:39 +0100470java_library {
Jiyong Park7fb4b182019-12-20 14:35:43 +0900471 name: "hwbinder.stubs",
472 sdk_version: "core_current",
Colin Cross037d7fb2021-03-25 17:01:55 -0700473 libs: ["framework-annotations-lib"],
Jiyong Park7fb4b182019-12-20 14:35:43 +0900474 srcs: [
475 ":hwbinder-stubs-docs",
476 ],
Anton Hansson86925682021-04-14 14:54:43 +0100477 visibility: ["//visibility:public"],
Jiyong Park7fb4b182019-12-20 14:35:43 +0900478}