use CommonAttributes for Tags in protos filegroups
The Tags attribute is now available in CommonAttributes, and if we use
that one, we won't get errors with conflicting definitions of the
attribute if a global Tags value is added via CommonAttributes.
Test: m bp2build
Change-Id: I422ed817b84e6808ef60fe3599fe84332bc51d8e
diff --git a/android/filegroup.go b/android/filegroup.go
index af4d89a..d21d146 100644
--- a/android/filegroup.go
+++ b/android/filegroup.go
@@ -122,16 +122,18 @@
if fg.ShouldConvertToProtoLibrary(ctx) {
// TODO(b/246997908): we can remove this tag if we could figure out a
// solution for this bug.
- tags := []string{"manual"}
attrs := &ProtoAttrs{
Srcs: srcs,
Strip_import_prefix: fg.properties.Path,
- Tags: tags,
}
+ tags := []string{"manual"}
ctx.CreateBazelTargetModule(
bazel.BazelTargetModuleProperties{Rule_class: "proto_library"},
- CommonAttributes{Name: fg.Name() + convertedProtoLibrarySuffix},
+ CommonAttributes{
+ Name: fg.Name() + convertedProtoLibrarySuffix,
+ Tags: bazel.MakeStringListAttribute(tags),
+ },
attrs)
}