Add path properties mutator

Add a mutator pass after DepsMutator that visits every property
struct in every module looking for properties that have a tag
`android:"path"`, and automatically add a SourceDepTag dependency
on any module references (":module-name") found.  Uses a cache to
store the mapping of property struct type to locations of
properties with the tag.

Test: android/path_properties_test.go
Change-Id: I38c0497843dde4890e9342c3a6f0b402c0720742
This commit is contained in:
Colin Cross
2019-03-04 22:33:56 -08:00
parent 1361449710
commit 1b48842a4b
6 changed files with 250 additions and 2 deletions

View File

@@ -91,6 +91,7 @@ var preDeps = []RegisterMutatorFunc{
}
var postDeps = []RegisterMutatorFunc{
registerPathDepsMutator,
RegisterPrebuiltsPostDepsMutators,
registerNeverallowMutator,
}