blob: 151091137c9ce8718ac84bc327b0ad6e823bed60 [file] [log] [blame]
Anton Hansson24c88f42019-12-13 16:17:27 +00001// 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
15mainline_stubs_args =
16 "--error UnhiddenSystemApi " +
17 "--hide BroadcastBehavior " +
18 "--hide DeprecationMismatch " +
19 "--hide HiddenSuperclass " +
20 "--hide HiddenTypedefConstant " +
21 "--hide HiddenTypeParameter " +
22 "--hide MissingPermission " +
23 "--hide RequiresPermission " +
24 "--hide SdkConstant " +
25 "--hide Todo " +
26 "--hide Typo " +
27 "--hide UnavailableSymbol "
28
Anton Hansson5036ab62019-12-17 10:03:52 +000029// TODO: remove this server classes are cleaned up.
30mainline_stubs_args += "--hide-package com.android.server "
31
Anton Hanssona12addc2020-02-03 14:44:47 +000032priv_apps = " " +
33 "--show-annotation android.annotation.SystemApi\\(" +
Jiyong Parkb4f8a852020-02-25 17:12:30 +090034 "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
Anton Hanssona12addc2020-02-03 14:44:47 +000035 "\\) "
36
37module_libs = " " +
38 " --show-annotation android.annotation.SystemApi\\(" +
Jiyong Parkb4f8a852020-02-25 17:12:30 +090039 "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
Anton Hanssona12addc2020-02-03 14:44:47 +000040 "\\) "
41
Anton Hansson24c88f42019-12-13 16:17:27 +000042stubs_defaults {
43 name: "framework-module-stubs-defaults-publicapi",
44 args: mainline_stubs_args,
45 installable: false,
Anton Hansson15273532020-03-09 19:14:28 +000046 sdk_version: "current",
Anton Hansson24c88f42019-12-13 16:17:27 +000047}
48
49stubs_defaults {
50 name: "framework-module-stubs-defaults-systemapi",
Anton Hanssona12addc2020-02-03 14:44:47 +000051 args: mainline_stubs_args + priv_apps,
Jiyong Parkb4f8a852020-02-25 17:12:30 +090052 srcs: [":framework-annotations"],
Jiyong Park7be934f2020-01-06 16:22:32 +090053 installable: false,
Anton Hansson15273532020-03-09 19:14:28 +000054 sdk_version: "system_current",
Jiyong Park7be934f2020-01-06 16:22:32 +090055}
56
Anton Hanssona12addc2020-02-03 14:44:47 +000057// The defaults for module_libs comes in two parts - defaults for API checks
58// and defaults for stub generation. This is because we want the API txt
59// files to *only* include the module_libs_api, but the stubs to include
60// module_libs_api as well as priv_apps.
61
Jiyong Park7be934f2020-01-06 16:22:32 +090062stubs_defaults {
Anton Hanssona12addc2020-02-03 14:44:47 +000063 name: "framework-module-api-defaults-module_libs_api",
64 args: mainline_stubs_args + module_libs,
Jiyong Parkb4f8a852020-02-25 17:12:30 +090065 srcs: [":framework-annotations"],
Jiyong Park7be934f2020-01-06 16:22:32 +090066 installable: false,
Anton Hansson15273532020-03-09 19:14:28 +000067 sdk_version: "module_current",
Jiyong Park7be934f2020-01-06 16:22:32 +090068}
69
70stubs_defaults {
71 name: "framework-module-stubs-defaults-module_libs_api",
Anton Hanssona12addc2020-02-03 14:44:47 +000072 args: mainline_stubs_args + module_libs + priv_apps,
Jiyong Parkb4f8a852020-02-25 17:12:30 +090073 srcs: [":framework-annotations"],
Anton Hansson24c88f42019-12-13 16:17:27 +000074 installable: false,
Anton Hansson15273532020-03-09 19:14:28 +000075 sdk_version: "module_current",
Anton Hansson24c88f42019-12-13 16:17:27 +000076}