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/bp2build/build_conversion.go b/bp2build/build_conversion.go
index 2c553c6..8d173b9 100644
--- a/bp2build/build_conversion.go
+++ b/bp2build/build_conversion.go
@@ -463,7 +463,7 @@
}
func targetNameForBp2Build(c bpToBuildContext, logicModule blueprint.Module) string {
- return strings.Replace(c.ModuleName(logicModule), "__bp2build__", "", 1)
+ return strings.Replace(c.ModuleName(logicModule), bazel.BazelTargetModuleNamePrefix, "", 1)
}
func targetNameWithVariant(c bpToBuildContext, logicModule blueprint.Module) string {