Merge "Use merged annotations zip for lint" am: 3881e8d7fb

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092226

Change-Id: Ic12c9456d9bdea7addee0ece81cdd0317b40f623
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Anton Hansson
2022-05-11 20:38:44 +00:00
committed by Automerger Merge Worker

View File

@@ -532,6 +532,14 @@ func (l *lintSingleton) copyLintDependencies(ctx android.SingletonContext) {
return 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") filteredDb := findModuleOrErr(ctx, "api-versions-xml-public-filtered")
if filteredDb == nil { if filteredDb == nil {
if !ctx.Config().AllowMissingDependencies() { if !ctx.Config().AllowMissingDependencies() {
@@ -542,7 +550,7 @@ func (l *lintSingleton) copyLintDependencies(ctx android.SingletonContext) {
ctx.Build(pctx, android.BuildParams{ ctx.Build(pctx, android.BuildParams{
Rule: android.CpIfChanged, Rule: android.CpIfChanged,
Input: android.OutputFileForModule(ctx, frameworkDocStubs, ".annotations.zip"), Input: android.OutputFileForModule(ctx, sdkAnnotations, ""),
Output: copiedAnnotationsZipPath(ctx), Output: copiedAnnotationsZipPath(ctx),
}) })