Annotate paths and deprecate ExtractSource(s)Deps

Add `android:"path"` to all properties that take paths to source
files, and remove the calls to ExtractSource(s)Deps, the
pathsDepsMutator will add the necessary SourceDepTag dependency.

Test: All soong tests
Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
This commit is contained in:
Colin Cross
2019-03-04 22:35:41 -08:00
parent 1b48842a4b
commit 27b922f53e
23 changed files with 83 additions and 236 deletions

View File

@@ -26,9 +26,9 @@ func init() {
type fileGroupProperties struct {
// srcs lists files that will be included in this filegroup
Srcs []string
Srcs []string `android:"path"`
Exclude_srcs []string
Exclude_srcs []string `android:"path"`
// The base path to the files. May be used by other modules to determine which portion
// of the path to use. For example, when a filegroup is used as data in a cc_test rule,
@@ -59,11 +59,6 @@ func FileGroupFactory() Module {
return module
}
func (fg *fileGroup) DepsMutator(ctx BottomUpMutatorContext) {
ExtractSourcesDeps(ctx, fg.properties.Srcs)
ExtractSourcesDeps(ctx, fg.properties.Exclude_srcs)
}
func (fg *fileGroup) GenerateAndroidBuildActions(ctx ModuleContext) {
fg.srcs = ctx.ExpandSourcesSubDir(fg.properties.Srcs, fg.properties.Exclude_srcs, String(fg.properties.Path))
}