Merge "Support configurable prebuilt apex sources" into main

This commit is contained in:
Treehugger Robot
2024-08-15 15:43:52 +00:00
committed by Gerrit Code Review

View File

@@ -516,7 +516,7 @@ type ApexFileProperties struct {
// This cannot be marked as `android:"arch_variant"` because the `prebuilt_apex` is only mutated // This cannot be marked as `android:"arch_variant"` because the `prebuilt_apex` is only mutated
// for android_common. That is so that it will have the same arch variant as, and so be compatible // for android_common. That is so that it will have the same arch variant as, and so be compatible
// with, the source `apex` module type that it replaces. // with, the source `apex` module type that it replaces.
Src *string `android:"path"` Src proptools.Configurable[string] `android:"path,replace_instead_of_append"`
Arch struct { Arch struct {
Arm struct { Arm struct {
Src *string `android:"path"` Src *string `android:"path"`
@@ -566,7 +566,7 @@ func (p *ApexFileProperties) prebuiltApexSelector(ctx android.BaseModuleContext,
src = String(p.Arch.X86_64.Src) src = String(p.Arch.X86_64.Src)
} }
if src == "" { if src == "" {
src = String(p.Src) src = p.Src.GetOrDefault(ctx, "")
} }
if src == "" { if src == "" {