Broaden the granularity of config_setting from apex_name to api_domain
The use case for this is for creating a select statement for stub/impl
selection. Since Bazel propagates apex_name from the top-level apex,
the source apex and test apex builds a specific library in two different
configurations. We need select statements for both these two
configurations, but this metadata might not always exist in Android.bp
since test apexes are not necessary to be listed in Android.bp files.
To overcome this, the select statements will be created per api domain
instead. This CL uses a naming convention to infer the api domain of
apexes.
Test: go test ./bp2build
Change-Id: Iad2b45f736bc98a24d2ce1cf2f69aad67973092d
diff --git a/bazel/properties.go b/bazel/properties.go
index 1757bad..c3b68a4 100644
--- a/bazel/properties.go
+++ b/bazel/properties.go
@@ -1434,4 +1434,6 @@
type ConfigSettingAttributes struct {
// Each key in Flag_values is a label to a custom string_setting
Flag_values StringMapAttribute
+ // Each element in Constraint_values is a label to a constraint_value
+ Constraint_values LabelListAttribute
}