Move bazel.Properties to a BazelModuleBase

This allows more direct access to the bazel label and whether the module
is bp2build available.

Test: go test *
Change-Id: I23375835d20fa53d7d94127b2dc2d5bb20487bfb
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 9fa6c48..25ad1b6 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -124,14 +124,12 @@
 
 	// input files to exclude
 	Exclude_srcs []string `android:"path,arch_variant"`
-
-	// Properties for Bazel migration purposes.
-	bazel.Properties
 }
 
 type Module struct {
 	android.ModuleBase
 	android.DefaultableModuleBase
+	android.BazelModuleBase
 	android.ApexModuleBase
 
 	// For other packages to make their own genrules with extra
@@ -519,7 +517,7 @@
 
 	g.outputFiles = outputFiles.Paths()
 
-	bazelModuleLabel := g.properties.Bazel_module.Label
+	bazelModuleLabel := g.GetBazelLabel()
 	bazelActionsUsed := false
 	if ctx.Config().BazelContext.BazelEnabled() && len(bazelModuleLabel) > 0 {
 		bazelActionsUsed = g.generateBazelBuildActions(ctx, bazelModuleLabel)
@@ -771,6 +769,7 @@
 	m := NewGenRule()
 	android.InitAndroidModule(m)
 	android.InitDefaultableModule(m)
+	android.InitBazelModule(m)
 	return m
 }
 
@@ -800,7 +799,7 @@
 
 func GenruleBp2Build(ctx android.TopDownMutatorContext) {
 	m, ok := ctx.Module().(*Module)
-	if !ok || !m.properties.Bazel_module.Bp2build_available {
+	if !ok || !m.ConvertWithBp2build() {
 		return
 	}