Files
Paul Duffin ec7588b4be Use empty previous API when unsafe_ignore_missing_latest_api: true
Previously, when `unsafe_ignore_missing_latest_api == true` then Soong
would not pass any previous released API to Metalava via the
`--check-compatibility:*` command line options. That meant that
Metalava could not fail if it processed flagged APIs without a
previously released API. That in turn lead to lots of issues that were
time consuming to triage and address.

This change makes Soong pass Metalava an empty previously released API
while disabling compatibility checks and API lint to replicate the
previous behavior.

This is preparation for making Metalava fail fast if it is provided
with API flags but no previously released API to which flagged APIs can
be reverted.

Bug: 425309457
Test: TH
Change-Id: Ibbe8a7fb1536bd066153653178294af082beba8b
2025-06-17 17:54:04 +01:00

31 lines
1.1 KiB
Plaintext

// Copyright (C) 2024 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.
filegroup {
name: "metalava-config-files",
srcs: ["*-config.xml"],
visibility: ["//visibility:public"],
}
// The previously released API to use when a java_sdk_library specifies
// `unsafe_ignore_missing_latest_api: true`
//
// This is needed because Metalava requires a previously released API to be
// provided when using flagged APIs.
filegroup {
name: "default-unsafe-ignore-missing-latest-api",
srcs: ["default-unsafe-ignore-missing-latest-api.txt"],
visibility: ["//visibility:public"],
}