summaryrefslogtreecommitdiff
path: root/android/configurable_properties.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-07-30 13:17:28 -0700
committer Cole Faust <colefaust@google.com> 2024-07-30 13:17:28 -0700
commit12ff57d61c4dce711d16da45cdd5c3079fed69dd (patch)
tree718d9f359eb9b0a87b0ebf63b5e11559face6d1d /android/configurable_properties.go
parentea6451a03abf35c622752fd5dfcb9fdabfa64ab0 (diff)
Make the prefer property configurable
To replace soong config modules with selects. Bug: 342006386 Test: m nothing --no-skip-soong-tests Change-Id: I56080c9a1647a072836d4e4e50d6a5d2c1a69d28
Diffstat (limited to 'android/configurable_properties.go')
-rw-r--r--android/configurable_properties.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/android/configurable_properties.go b/android/configurable_properties.go
index dad42fa1d..2c794a186 100644
--- a/android/configurable_properties.go
+++ b/android/configurable_properties.go
@@ -26,3 +26,9 @@ func CreateSelectOsToBool(cases map[string]*bool) proptools.Configurable[bool] {
resultCases,
)
}
+
+func NewSimpleConfigurable[T proptools.ConfigurableElements](value T) proptools.Configurable[T] {
+ return proptools.NewConfigurable(nil, []proptools.ConfigurableCase[T]{
+ proptools.NewConfigurableCase(nil, &value),
+ })
+}