Support filegroups for version_script and related properties

Bug: 71715793
Test: m checkbuild
Change-Id: Ibf78a5ec88e743f29504c91057d2cfced667c8b4
This commit is contained in:
Colin Cross
2018-02-06 14:40:13 -08:00
parent fa54e751d9
commit 2383f3b693
3 changed files with 27 additions and 6 deletions

View File

@@ -110,6 +110,7 @@ type ModuleContext interface {
ExpandSources(srcFiles, excludes []string) Paths
ExpandSource(srcFile, prop string) Path
ExpandOptionalSource(srcFile *string, prop string) OptionalPath
ExpandSourcesSubDir(srcFiles, excludes []string, subDir string) Paths
Glob(globPattern string, excludes []string) Paths
@@ -1162,6 +1163,16 @@ func (ctx *androidModuleContext) ExpandSource(srcFile, prop string) Path {
}
}
// Returns an optional single path expanded from globs and modules referenced using ":module" syntax if
// the srcFile is non-nil.
// ExtractSourceDeps must have already been called during the dependency resolution phase.
func (ctx *androidModuleContext) ExpandOptionalSource(srcFile *string, prop string) OptionalPath {
if srcFile != nil {
return OptionalPathForPath(ctx.ExpandSource(*srcFile, prop))
}
return OptionalPath{}
}
func (ctx *androidModuleContext) ExpandSourcesSubDir(srcFiles, excludes []string, subDir string) Paths {
prefix := PathForModuleSrc(ctx).String()