From b2cf181a015fc35eae6174c9615ae0071d5a2023 Mon Sep 17 00:00:00 2001 From: Andrei Onea Date: Fri, 19 Feb 2021 16:28:30 +0000 Subject: [PATCH] Add genrules for merged system server stubs This is a change analogous to https://r.android.com/1432681 for system server stubs; it feeds into metalava the stubs for the non-updatable system server api stubs and the individual mainline module system server stubs to generate a merged .txt file that will eventually replace the monolithic one in frameworks/base/services/api/current.txt . Bug: 177640454 Test: diff frameworks/base/services/api/current.txt \ out/soong/.intermediates/frameworks/base/api/services-system-server-current.txt/gen/system-server-current.txt Change-Id: I021f59bb91572d28798a97ab8aa687b684599d6c --- api/Android.bp | 46 +++++++++++++++++++++++++++++++++++++++++ services/api/Android.bp | 29 ++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 services/api/Android.bp diff --git a/api/Android.bp b/api/Android.bp index 2c2bb65402ea0..4a641f3519eba 100644 --- a/api/Android.bp +++ b/api/Android.bp @@ -312,3 +312,49 @@ genrule { out: ["combined-removed-dex.txt"], cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)", } + +genrule { + name: "services-system-server-current.txt", + srcs: [ + ":service-permission{.system-server.api.txt}", + ":non-updatable-system-server-current.txt", + ], + out: ["system-server-current.txt"], + tools: ["metalava"], + cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + dists: [ + { + targets: ["droidcore"], + dir: "api", + dest: "system-server-current.txt", + }, + { + targets: ["sdk", "win_sdk"], + dir: "apistubs/android/system-server/api", + dest: "merge-android.txt", + }, + ], +} + +genrule { + name: "services-system-server-removed.txt", + srcs: [ + ":service-permission{.system-server.removed-api.txt}", + ":non-updatable-system-server-removed.txt", + ], + out: ["system-server-removed.txt"], + tools: ["metalava"], + cmd: "$(location metalava) --no-banner --format=v2 $(in) --api $(out)", + dists: [ + { + targets: ["droidcore"], + dir: "api", + dest: "system-server-removed.txt", + }, + { + targets: ["sdk", "win_sdk"], + dir: "apistubs/android/system-server/api", + dest: "merge-removed.txt", + }, + ], +} diff --git a/services/api/Android.bp b/services/api/Android.bp new file mode 100644 index 0000000000000..b8ca5488c5cd6 --- /dev/null +++ b/services/api/Android.bp @@ -0,0 +1,29 @@ +// Copyright (C) 2021 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. + +package { + default_visibility: ["//visibility:private"], +} + +filegroup { + name: "non-updatable-system-server-current.txt", + srcs: ["non-updatable-current.txt"], + visibility: ["//frameworks/base/api"], +} + +filegroup { + name: "non-updatable-system-server-removed.txt", + srcs: ["non-updatable-removed.txt"], + visibility: ["//frameworks/base/api"], +} \ No newline at end of file