diff options
| author | 2023-05-31 17:51:33 +0100 | |
|---|---|---|
| committer | 2023-08-05 22:16:44 +0100 | |
| commit | d7d52fa7ccd3b007ab46eda218e6ef0fdc6a5748 (patch) | |
| tree | 0e0b34951403f7be9b158b5f30260368c52db5c1 /java/java.go | |
| parent | 8fcc99cc0946a00ae4d94f720f592db79fbc28ca (diff) | |
Explicitly specify `--api-class-resolution api` for metalava
Previously, `--api-class-resolution api` was the default if that option
was not specified but the other change in this topic is switching it to
`--api-class-resolution api:classpath` to match the behavior in
AndroidX. This change explicitly specifies the option needed by Soong's
use of metalava.
Bug: 294300564
Bug: 285140653
Test: m checkapi
Merged-In: Ief3c7f9dfdfa946f21cb048a579ec90309fb350f
Change-Id: Ief3c7f9dfdfa946f21cb048a579ec90309fb350f
(cherry picked from commit 5b7035f850612aecfd67b7099e62ce82659b3041)
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index ccb150747..dec7810e8 100644 --- a/java/java.go +++ b/java/java.go @@ -1723,6 +1723,10 @@ func metalavaStubCmd(ctx android.ModuleContext, rule *android.RuleBuilder, FlagWithArg("--hide ", "InvalidNullabilityOverride"). FlagWithArg("--hide ", "ChangedDefault") + // Force metalava to ignore classes on the classpath when an API file contains missing classes. + // See b/285140653 for more information. + cmd.FlagWithArg("--api-class-resolution ", "api") + return cmd } |