bp2build: add bazel_module: { bp2build_available } prop.
This CL adds a per-target allowlist to instruct bp2build on which modules it should generate Bazel targets for.
Test: soong tests
Change-Id: I869e66fce405c2c6689b381569b8cc0118cbcf76
diff --git a/android/filegroup.go b/android/filegroup.go
index b36238c..98d0eaf 100644
--- a/android/filegroup.go
+++ b/android/filegroup.go
@@ -49,9 +49,10 @@
func FilegroupBp2Build(ctx TopDownMutatorContext) {
fg, ok := ctx.Module().(*fileGroup)
- if !ok {
+ if !ok || !fg.properties.Bazel_module.Bp2build_available {
return
}
+
attrs := &bazelFilegroupAttributes{
Srcs: BazelLabelForModuleSrcExcludes(ctx, fg.properties.Srcs, fg.properties.Exclude_srcs),
}