Allow an arbitrary tag to be associated with a bp property
This is preparation for enhancing the versioning tranformer to support
applying per property transformations. Specifically, to allow
properties to reference other libraries within the sdk.
Bug: 142940300
Test: m nothing
Change-Id: I99cdff4b407763ed395ff358d8110a63c6cf5589
diff --git a/android/sdk.go b/android/sdk.go
index 9e6ad16..006b3a0 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -182,6 +182,8 @@
AddPrebuiltModule(member SdkMember, moduleType string) BpModule
}
+type BpPropertyTag interface{}
+
// A set of properties for use in a .bp file.
type BpPropertySet interface {
// Add a property, the value can be one of the following types:
@@ -190,9 +192,12 @@
// * bool
// * BpPropertySet
//
- // It is an error is multiples properties with the same name are added.
+ // It is an error if multiple properties with the same name are added.
AddProperty(name string, value interface{})
+ // Add a property with an associated tag
+ AddPropertyWithTag(name string, value interface{}, tag BpPropertyTag)
+
// Add a property set with the specified name and return so that additional
// properties can be added.
AddPropertySet(name string) BpPropertySet