aboutsummaryrefslogtreecommitdiffstats
path: root/java/support_libraries.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-02-07 14:25:51 -0800
committerColin Cross <ccross@android.com>2019-02-07 22:31:04 +0000
commit65494b962b5a1fc90fe09046763b25cb91b5ec63 (patch)
tree2a209afeea5af2f0665dae0af0a38657c17dfe92 /java/support_libraries.go
parent7cf14099b70241950e813fd9196a0b3f2cc4e981 (diff)
downloadandroid_build_soong-65494b962b5a1fc90fe09046763b25cb91b5ec63.tar.gz
android_build_soong-65494b962b5a1fc90fe09046763b25cb91b5ec63.tar.bz2
android_build_soong-65494b962b5a1fc90fe09046763b25cb91b5ec63.zip
Make MakeVarsContext a PathContext
Expose all of SingletonContext to makeVarsContext, and then export the subset of it that is used through MakeVarsContext.SingletonContext, plus what is necessary for PathContext, directly through MakeVarsContext. Test: m checkbuild Change-Id: Ie00f36e577fe110b6fa03b901da489d8547773c6
Diffstat (limited to 'java/support_libraries.go')
-rw-r--r--java/support_libraries.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/java/support_libraries.go b/java/support_libraries.go
index 320afae1..5a72f41a 100644
--- a/java/support_libraries.go
+++ b/java/support_libraries.go
@@ -28,9 +28,8 @@ func init() {
func supportLibrariesMakeVarsProvider(ctx android.MakeVarsContext) {
var supportAars, supportJars []string
- sctx := ctx.SingletonContext()
- sctx.VisitAllModules(func(module android.Module) {
- dir := sctx.ModuleDir(module)
+ ctx.VisitAllModules(func(module android.Module) {
+ dir := ctx.ModuleDir(module)
switch {
case strings.HasPrefix(dir, "prebuilts/sdk/current/extras"),
dir == "prebuilts/sdk/current/androidx",
@@ -43,7 +42,7 @@ func supportLibrariesMakeVarsProvider(ctx android.MakeVarsContext) {
return
}
- name := sctx.ModuleName(module)
+ name := ctx.ModuleName(module)
if strings.HasSuffix(name, "-nodeps") {
return
}
@@ -54,7 +53,7 @@ func supportLibrariesMakeVarsProvider(ctx android.MakeVarsContext) {
case *Library, *Import:
supportJars = append(supportJars, name)
default:
- sctx.ModuleErrorf(module, "unknown module type %t", module)
+ ctx.ModuleErrorf(module, "unknown module type %t", module)
}
})