Add .lint tagged output to Java modules

The linter output can be referenced in other modules for further
processing.

Bug: 302400088
Test: m nothing
Change-Id: I1809b70d8d98ced5d8f3d5f068c6639c782ebebc
This commit is contained in:
Thiébaud Weksteen
2023-09-29 10:26:43 +10:00
parent 9c0dff9ae5
commit d054436434

View File

@@ -638,6 +638,11 @@ func (j *Module) OutputFiles(tag string) (android.Paths, error) {
return nil, fmt.Errorf("%q was requested, but no output file was found.", tag)
case ".generated_srcjars":
return j.properties.Generated_srcjars, nil
case ".lint":
if j.linter.outputs.xml != nil {
return android.Paths{j.linter.outputs.xml}, nil
}
return nil, fmt.Errorf("%q was requested, but no output file was found.", tag)
default:
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
}