From ee6143cde25cbe41df754337de89d608ca890bb1 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Sat, 30 Dec 2017 17:54:27 -0800 Subject: Add VisitDirectDepsWithTag Add a method on ModuleContext and TopDownMutatorContext to visit direct dependencies that have a given dependency tag. Test: m checkbuild Change-Id: Ib875563091dcae6b7282b3e3427d0eb07d8c8af5 --- java/system_modules.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'java/system_modules.go') diff --git a/java/system_modules.go b/java/system_modules.go index 5234d174f..196d041c8 100644 --- a/java/system_modules.go +++ b/java/system_modules.go @@ -112,11 +112,9 @@ type SystemModulesProperties struct { func (system *SystemModules) GenerateAndroidBuildActions(ctx android.ModuleContext) { var jars android.Paths - ctx.VisitDirectDeps(func(module android.Module) { - if ctx.OtherModuleDependencyTag(module) == libTag { - dep, _ := module.(Dependency) - jars = append(jars, dep.HeaderJars()...) - } + ctx.VisitDirectDepsWithTag(libTag, func(module android.Module) { + dep, _ := module.(Dependency) + jars = append(jars, dep.HeaderJars()...) }) jars = append(jars, android.PathsForModuleSrc(ctx, system.properties.Jars)...) -- cgit v1.2.3-59-g8ed1b