bp2build: refactor BazelTargetModule naming boilerplate.
This CL replaces the "__bp2build__" name prefix boilerplate with a props creation function, and centralizes the prefixing in there. Test: TH Test: soong tests Change-Id: Ic963199ab60dcce0d3361abff111cfa9acd4c21b
This commit is contained in:
@@ -57,12 +57,7 @@ func FilegroupBp2Build(ctx TopDownMutatorContext) {
|
||||
Srcs: BazelLabelForModuleSrcExcludes(ctx, fg.properties.Srcs, fg.properties.Exclude_srcs),
|
||||
}
|
||||
|
||||
// Can we automate this?
|
||||
name := "__bp2build__" + fg.Name()
|
||||
props := bazel.BazelTargetModuleProperties{
|
||||
Name: &name,
|
||||
Rule_class: "filegroup",
|
||||
}
|
||||
props := bazel.NewBazelTargetModuleProperties(fg.Name(), "filegroup", "")
|
||||
|
||||
ctx.CreateBazelTargetModule(BazelFileGroupFactory, props, attrs)
|
||||
}
|
||||
|
Reference in New Issue
Block a user