diff options
Diffstat (limited to 'java/bootclasspath.go')
-rw-r--r-- | java/bootclasspath.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/bootclasspath.go b/java/bootclasspath.go index f1a0bb55c..02833ab66 100644 --- a/java/bootclasspath.go +++ b/java/bootclasspath.go @@ -73,6 +73,8 @@ func addDependencyOntoApexVariants(ctx android.BottomUpMutatorContext, propertyN // module. This adds dependencies onto the prebuilt and source modules with the specified name, // depending on which ones are available. Visiting must use isActiveModule to select the preferred // module when both source and prebuilt modules are available. +// +// Use gatherApexModulePairDepsWithTag to retrieve the dependencies. func addDependencyOntoApexModulePair(ctx android.BottomUpMutatorContext, apex string, name string, tag blueprint.DependencyTag) { var variations []blueprint.Variation if apex != "platform" && apex != "system_ext" { @@ -118,6 +120,19 @@ func reportMissingVariationDependency(ctx android.BottomUpMutatorContext, variat ctx.AddFarVariationDependencies(variations, nil, name) } +// gatherApexModulePairDepsWithTag returns the list of dependencies with the supplied tag that was +// added by addDependencyOntoApexModulePair. +func gatherApexModulePairDepsWithTag(ctx android.BaseModuleContext, tag blueprint.DependencyTag) []android.Module { + var modules []android.Module + ctx.VisitDirectDepsIf(isActiveModule, func(module android.Module) { + t := ctx.OtherModuleDependencyTag(module) + if t == tag { + modules = append(modules, module) + } + }) + return modules +} + // ApexVariantReference specifies a particular apex variant of a module. type ApexVariantReference struct { // The name of the module apex variant, i.e. the apex containing the module variant. |