Handle nameless modules during bp2build conversion.
So far it is `package` module.
Test: treehugger
Change-Id: Ibf3af0b0bf0a532e2ea1d478275a5ac3784ef170
diff --git a/bp2build/androidbp_to_build_templates.go b/bp2build/androidbp_to_build_templates.go
index 5fed4fa..9b21c32 100644
--- a/bp2build/androidbp_to_build_templates.go
+++ b/bp2build/androidbp_to_build_templates.go
@@ -23,7 +23,7 @@
// A macro call in the BUILD file representing a Soong module, with space
// for expanding more attributes.
- soongModuleTarget = `soong_module(
+ soongModuleTargetTemplate = `soong_module(
name = "%s",
soong_module_name = "%s",
soong_module_type = "%s",
@@ -31,10 +31,13 @@
soong_module_deps = %s,
%s)`
- bazelTarget = `%s(
+ ruleTargetTemplate = `%s(
name = "%s",
%s)`
+ unnamedRuleTargetTemplate = `%s(
+%s)`
+
// A simple provider to mark and differentiate Soong module rule shims from
// regular Bazel rules. Every Soong module rule shim returns a
// SoongModuleInfo provider, and can only depend on rules returning