Jiyong Park 7be934f395 Define stubs_defaults for the new API surfaces
The new stubs_defaults shall be used to create stub libraries from
modules. The existing defaults
'framework-module-stubs-defaults-systemapi' is not enough because it
only captures the SystemApis with client=PRIVILEGED_APPS. Modules can
have broader SystemApis with client=MODULE_APPS and
client=MODULE_LIBRARIES.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: b/140202860
Test: m
Merged-In: I5f425928cf1db912ebe09499111a9925fcfc98fb
Change-Id: I5f425928cf1db912ebe09499111a9925fcfc98fb
(cherry picked from commit 2afff6cc73641dd11315e116f2f1f21ae4e64c56)
2020-01-13 21:34:50 +09:00

70 lines
2.6 KiB
Plaintext

// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
mainline_stubs_args =
"--error UnhiddenSystemApi " +
"--hide BroadcastBehavior " +
"--hide DeprecationMismatch " +
"--hide HiddenSuperclass " +
"--hide HiddenTypedefConstant " +
"--hide HiddenTypeParameter " +
"--hide MissingPermission " +
"--hide RequiresPermission " +
"--hide SdkConstant " +
"--hide Todo " +
"--hide Typo " +
"--hide UnavailableSymbol "
stubs_defaults {
name: "framework-module-stubs-defaults-publicapi",
args: mainline_stubs_args,
installable: false,
}
stubs_defaults {
name: "framework-module-stubs-defaults-systemapi",
args: mainline_stubs_args +
" --show-annotation android.annotation.SystemApi\\(" +
"client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
"process=android.annotation.SystemApi.Process.ALL\\) ",
installable: false,
}
stubs_defaults {
name: "framework-module-stubs-defaults-module_apps_api",
args: mainline_stubs_args +
" --show-annotation android.annotation.SystemApi\\(" +
"client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
"process=android.annotation.SystemApi.Process.ALL\\) " +
" --show-annotation android.annotation.SystemApi\\(" +
"client=android.annotation.SystemApi.Client.MODULE_APPS," +
"process=android.annotation.SystemApi.Process.ALL\\) ",
installable: false,
}
stubs_defaults {
name: "framework-module-stubs-defaults-module_libs_api",
args: mainline_stubs_args +
" --show-annotation android.annotation.SystemApi\\(" +
"client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
"process=android.annotation.SystemApi.Process.ALL\\) " +
" --show-annotation android.annotation.SystemApi\\(" +
"client=android.annotation.SystemApi.Client.MODULE_APPS," +
"process=android.annotation.SystemApi.Process.ALL\\) " +
" --show-annotation android.annotation.SystemApi\\(" +
"client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," +
"process=android.annotation.SystemApi.Process.ALL\\) ",
installable: false,
}