Copy white listed apex available settings into snapshot
Makes sure that the module snapshots do not rely on the white list of apex available settings so that when those lists are removed it is not necessary to update any snapshots. Bug: 142935992 Test: m nothing Change-Id: Iedcff7dfc2646a4da77258d16e06657dd2f411f9
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"android/soong/apex"
|
||||
"github.com/google/blueprint"
|
||||
"github.com/google/blueprint/proptools"
|
||||
|
||||
@@ -640,7 +641,15 @@ func (s *snapshotBuilder) AddPrebuiltModule(member android.SdkMember, moduleType
|
||||
// Where available copy apex_available properties from the member.
|
||||
if apexAware, ok := variant.(interface{ ApexAvailable() []string }); ok {
|
||||
apexAvailable := apexAware.ApexAvailable()
|
||||
|
||||
// Add in any white listed apex available settings.
|
||||
apexAvailable = append(apexAvailable, apex.WhitelistedApexAvailable(member.Name())...)
|
||||
|
||||
if len(apexAvailable) > 0 {
|
||||
// Remove duplicates and sort.
|
||||
apexAvailable = android.FirstUniqueStrings(apexAvailable)
|
||||
sort.Strings(apexAvailable)
|
||||
|
||||
m.AddProperty("apex_available", apexAvailable)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user