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
This commit is contained in:
Liz Kammer
2021-02-17 10:17:28 -05:00
parent ece454400d
commit ea6666fba9
9 changed files with 76 additions and 23 deletions

View File

@@ -118,7 +118,7 @@ func BazelObjectFactory() android.Module {
// Bazel equivalent target, plus any necessary include deps for the cc_object.
func ObjectBp2Build(ctx android.TopDownMutatorContext) {
m, ok := ctx.Module().(*Module)
if !ok || !m.Properties.Bazel_module.Bp2build_available {
if !ok || !m.ConvertWithBp2build() {
return
}