Change bp2build converter of module "package".

1) Use attribute name "default_package_metadata" instead of
   "default_applicable_licenses" in packages to better describe its use.
2) Add a filegroup "default_metadata_file" in packages to search for
   METADATA file in each package.
3) Include "default_metadata_file" in each package's
   "default_package_metadata" attribute.

Bug: 275472038
Test: CIs
Change-Id: I645c013c39e3190fd96c4a549d39a331aced16bd
This commit is contained in:
Wei Li
2023-05-05 01:07:15 -07:00
parent e3f0281b88
commit 2c9e8d6128
5 changed files with 94 additions and 7 deletions

View File

@@ -75,7 +75,8 @@ func isFilegroupWithPattern(pattern *regexp.Regexp) bazel.LabelMapper {
// https://docs.bazel.build/versions/master/be/general.html#filegroup
type bazelFilegroupAttributes struct {
Srcs bazel.LabelListAttribute
Srcs bazel.LabelListAttribute
Applicable_licenses bazel.LabelListAttribute
}
type bazelAidlLibraryAttributes struct {