Build a zip of transitive lint reports for apps

Add a rule to build a zip containing the lint reports from transitive
dependencies for apps, and pass it to Make.

Bug: 153485543
Test: m TARGET_BUILD_APPS=Gallery2 lint-check
Change-Id: I523c09016251377ff89d76084769be7401b95425
This commit is contained in:
Colin Cross
2020-07-03 11:56:24 -07:00
parent 9e44e21e91
commit c0efd1db13
5 changed files with 114 additions and 28 deletions

View File

@@ -484,6 +484,10 @@ func (p Paths) Strings() []string {
return ret
}
func CopyOfPaths(paths Paths) Paths {
return append(Paths(nil), paths...)
}
// FirstUniquePaths returns all unique elements of a Paths, keeping the first copy of each. It
// modifies the Paths slice contents in place, and returns a subslice of the original slice.
func FirstUniquePaths(list Paths) Paths {
@@ -494,7 +498,8 @@ func FirstUniquePaths(list Paths) Paths {
return firstUniquePathsList(list)
}
// SortedUniquePaths returns what its name says
// SortedUniquePaths returns all unique elements of a Paths in sorted order. It modifies the
// Paths slice contents in place, and returns a subslice of the original slice.
func SortedUniquePaths(list Paths) Paths {
unique := FirstUniquePaths(list)
sort.Slice(unique, func(i, j int) bool {