summaryrefslogtreecommitdiff
path: root/java/lint.go
diff options
context:
space:
mode:
author Anton Hansson <hansson@google.com> 2022-05-09 09:42:17 +0000
committer Anton Hansson <hansson@google.com> 2022-05-09 10:26:58 +0000
commitea17a45c262d7ddb4eb78ea424c29e9833d17c66 (patch)
treebfabe77613da8e9dda5dfb88412e9784f4ceeadb /java/lint.go
parent4bf0080b25b2a9c3550fbc6ff7e305be5841e389 (diff)
Use merged annotations zip for lint
The framework-doc-stubs annotations.zip is no longer the correct zip to use after b/187397779. It doesn't contain the module annotations. Test: presubmit Change-Id: I50e0bcc026c97886a31256e2387632c19d4b287f
Diffstat (limited to 'java/lint.go')
-rw-r--r--java/lint.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/java/lint.go b/java/lint.go
index 426a2af25..f7da1d1c9 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -532,6 +532,14 @@ func (l *lintSingleton) copyLintDependencies(ctx android.SingletonContext) {
return
}
+ sdkAnnotations := findModuleOrErr(ctx, "sdk-annotations.zip")
+ if sdkAnnotations == nil {
+ if !ctx.Config().AllowMissingDependencies() {
+ ctx.Errorf("lint: missing module sdk-annotations.zip")
+ }
+ return
+ }
+
filteredDb := findModuleOrErr(ctx, "api-versions-xml-public-filtered")
if filteredDb == nil {
if !ctx.Config().AllowMissingDependencies() {
@@ -542,7 +550,7 @@ func (l *lintSingleton) copyLintDependencies(ctx android.SingletonContext) {
ctx.Build(pctx, android.BuildParams{
Rule: android.CpIfChanged,
- Input: android.OutputFileForModule(ctx, frameworkDocStubs, ".annotations.zip"),
+ Input: android.OutputFileForModule(ctx, sdkAnnotations, ""),
Output: copiedAnnotationsZipPath(ctx),
})