Allow common.Glob to be called by singletons

Make common.Glob take an interface that is the intersection of
blueprint.ModuleContext and blueprint.SingletonContext used by
Glob and GlobRule, allowing it to be called on either.  Also
move ExpandSources and Glob into AndroidModuleContext.

Change-Id: I8d1a3160c5dd201033afdb37210e82d8065b137d
This commit is contained in:
Colin Cross
2015-06-17 15:09:06 -07:00
parent 1f8c52be73
commit 8f101b45fc
7 changed files with 53 additions and 40 deletions

View File

@@ -47,7 +47,7 @@ func ResourceDirsToJarSpecs(ctx common.AndroidModuleContext, resourceDirs []stri
continue
}
resourceDir := filepath.Join(common.ModuleSrcDir(ctx), resourceDir)
dirs := common.Glob(ctx, resourceDir, nil)
dirs := ctx.Glob(resourceDir, nil)
for _, dir := range dirs {
fileListFile := filepath.Join(common.ModuleOutDir(ctx), "res", dir, "resources.list")
depFile := fileListFile + ".d"