Remove ExpandSourcesSubDir and ModuleSrcPath.WithSubDir

Replace ExpandSourcesSubDir with ExpandSources plus
PathsWithModuleSrcSubDir, which loops over the paths and uses
Join to create paths relative to subdir on any results that
are ModuleSrcPaths.

Test: All soong tests
Change-Id: I11a7face88641e2c26ccdca0a3117d5c38ab588e
This commit is contained in:
Colin Cross
2019-03-05 12:39:51 -08:00
parent 42be761ebd
commit 2fafa3ec49
3 changed files with 66 additions and 47 deletions

View File

@@ -60,7 +60,11 @@ func FileGroupFactory() Module {
}
func (fg *fileGroup) GenerateAndroidBuildActions(ctx ModuleContext) {
fg.srcs = ctx.ExpandSourcesSubDir(fg.properties.Srcs, fg.properties.Exclude_srcs, String(fg.properties.Path))
fg.srcs = ctx.ExpandSources(fg.properties.Srcs, fg.properties.Exclude_srcs)
if fg.properties.Path != nil {
fg.srcs = PathsWithModuleSrcSubDir(ctx, fg.srcs, String(fg.properties.Path))
}
}
func (fg *fileGroup) Srcs() Paths {