Add variant_prepend support for all the properties in bp2build
This is a follow up of aosp/2336916. All the properties that have
variant_prepend tag are supported in bp2build.
Bug: 261644490
Test: TH and modified tests with updated expected behaviors
Change-Id: I13bb5d4d8fcd38bf153fa9083c9c945aec2dfa19
diff --git a/bazel/properties.go b/bazel/properties.go
index f9cabf2..76450dc 100644
--- a/bazel/properties.go
+++ b/bazel/properties.go
@@ -674,6 +674,11 @@
// specific select statements where an empty list for a non-default select
// key has a meaning.
EmitEmptyList bool
+
+ // If a property has struct tag "variant_prepend", this value should
+ // be set to True, so that when bp2build generates BUILD.bazel, variant
+ // properties(select ...) come before general properties.
+ Prepend bool
}
type configurableLabelLists map[ConfigurationAxis]labelListSelectValues