Merge changes from topics "replace_instead_of_append", "selects_get_and_get_default" into main am: 42a8b256af
am: 394158399e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3028124 Change-Id: I9816cc1ab8a2f549de44596ce71dea8f827ee552 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -109,9 +109,9 @@ func pathPropertiesForPropertyStruct(ctx BottomUpMutatorContext, ps interface{})
|
||||
case reflect.Struct:
|
||||
intf := sv.Interface()
|
||||
if configurable, ok := intf.(proptools.Configurable[string]); ok {
|
||||
ret = append(ret, proptools.String(configurable.Evaluate(ctx)))
|
||||
ret = append(ret, configurable.GetOrDefault(ctx, ""))
|
||||
} else if configurable, ok := intf.(proptools.Configurable[[]string]); ok {
|
||||
ret = append(ret, proptools.Slice(configurable.Evaluate(ctx))...)
|
||||
ret = append(ret, configurable.GetOrDefault(ctx, nil)...)
|
||||
} else {
|
||||
panic(fmt.Errorf(`field %s in type %s has tag android:"path" but is not a string or slice of strings, it is a %s`,
|
||||
v.Type().FieldByIndex(i).Name, v.Type(), sv.Type()))
|
||||
|
@@ -489,11 +489,11 @@ type selectsMockModule struct {
|
||||
|
||||
func (p *selectsMockModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
||||
SetProvider(ctx, selectsTestProviderKey, selectsTestProvider{
|
||||
my_bool: p.properties.My_bool.Evaluate(ctx),
|
||||
my_string: p.properties.My_string.Evaluate(ctx),
|
||||
my_string_list: p.properties.My_string_list.Evaluate(ctx),
|
||||
my_paths: p.properties.My_paths.Evaluate(ctx),
|
||||
replacing_string_list: p.properties.Replacing_string_list.Evaluate(ctx),
|
||||
my_bool: p.properties.My_bool.Get(ctx),
|
||||
my_string: p.properties.My_string.Get(ctx),
|
||||
my_string_list: p.properties.My_string_list.Get(ctx),
|
||||
my_paths: p.properties.My_paths.Get(ctx),
|
||||
replacing_string_list: p.properties.Replacing_string_list.Get(ctx),
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user