diff options
author | Colin Cross <ccross@android.com> | 2015-06-17 15:09:06 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-06-17 15:36:48 -0700 |
commit | 8f101b45fc876b63f2a556c5b19801dbc8ac5fdc (patch) | |
tree | 2be41986a7a55669b2a6632f84685c6a46e343a8 /java | |
parent | 1f8c52be73d31f3347bcf7f8fb29b49e87b3864e (diff) | |
download | build_soong-8f101b45fc876b63f2a556c5b19801dbc8ac5fdc.tar.gz build_soong-8f101b45fc876b63f2a556c5b19801dbc8ac5fdc.tar.bz2 build_soong-8f101b45fc876b63f2a556c5b19801dbc8ac5fdc.zip |
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
Diffstat (limited to 'java')
-rw-r--r-- | java/app.go | 4 | ||||
-rw-r--r-- | java/java.go | 2 | ||||
-rw-r--r-- | java/resources.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/java/app.go b/java/app.go index 869cfea0..5f153cf4 100644 --- a/java/app.go +++ b/java/app.go @@ -244,14 +244,14 @@ func (a *AndroidApp) aaptFlags(ctx common.AndroidModuleContext) ([]string, []str var aaptDeps []string var hasResources bool for _, d := range resourceDirs { - newDeps := common.Glob(ctx, filepath.Join(d, "**/*"), aaptIgnoreFilenames) + newDeps := ctx.Glob(filepath.Join(d, "**/*"), aaptIgnoreFilenames) aaptDeps = append(aaptDeps, newDeps...) if len(newDeps) > 0 { hasResources = true } } for _, d := range assetDirs { - newDeps := common.Glob(ctx, filepath.Join(d, "**/*"), aaptIgnoreFilenames) + newDeps := ctx.Glob(filepath.Join(d, "**/*"), aaptIgnoreFilenames) aaptDeps = append(aaptDeps, newDeps...) } diff --git a/java/java.go b/java/java.go index d22f47a7..9787d602 100644 --- a/java/java.go +++ b/java/java.go @@ -292,7 +292,7 @@ func (j *javaBase) GenerateJavaBuildActions(ctx common.AndroidModuleContext) { javacDeps = append(javacDeps, classpath...) } - srcFiles := common.ExpandSources(ctx, j.properties.Srcs) + srcFiles := ctx.ExpandSources(j.properties.Srcs) srcFiles = j.genSources(ctx, srcFiles, flags) diff --git a/java/resources.go b/java/resources.go index 7aa909ee..f9d7a05b 100644 --- a/java/resources.go +++ b/java/resources.go @@ -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" |