Merge "Treat lint warnings as errors" into rvc-dev am: 3292836210

Change-Id: I54329e9e9bb7689d44526e6453aff0bcbca11c94
This commit is contained in:
Anton Hansson 2020-05-05 10:17:28 +00:00 committed by Automerger Merge Worker
commit 2ddb61f72c
1 changed files with 9 additions and 0 deletions

View File

@ -1487,6 +1487,15 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
cmd := metalavaCmd(ctx, rule, javaVersion, d.Javadoc.srcFiles, srcJarList,
deps.bootClasspath, deps.classpath, d.Javadoc.sourcepaths)
// TODO(b/154317059): Clean up this whitelist by baselining and/or checking in last-released.
if d.Name() != "android.car-system-stubs-docs" &&
d.Name() != "android.car-stubs-docs" &&
d.Name() != "system-api-stubs-docs" &&
d.Name() != "test-api-stubs-docs" {
cmd.Flag("--lints-as-errors")
cmd.Flag("--warnings-as-errors") // Most lints are actually warnings.
}
cmd.Flag(d.Javadoc.args).Implicits(d.Javadoc.argFiles)
newSince := android.OptionalPathForModuleSrc(ctx, d.properties.Check_api.Api_lint.New_since)