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
diff --git a/android/filegroup.go b/android/filegroup.go
index 98d0eaf..674a196 100644
--- a/android/filegroup.go
+++ b/android/filegroup.go
@@ -57,12 +57,7 @@
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)
}