Merge "Do not add dependencies from disabled sdk variants to its members"

This commit is contained in:
Treehugger Robot 2020-02-21 08:18:25 +00:00 committed by Gerrit Code Review
commit 1c1c6ab46b

View file

@ -320,10 +320,12 @@ func (t sdkMemberVersionedDepTag) ExcludeFromVisibilityEnforcement() {}
// Step 1: create dependencies from an SDK module to its members.
func memberMutator(mctx android.BottomUpMutatorContext) {
if s, ok := mctx.Module().(*sdk); ok {
for _, memberListProperty := range s.memberListProperties() {
names := memberListProperty.getter(s.dynamicMemberTypeListProperties)
tag := memberListProperty.dependencyTag
memberListProperty.memberType.AddDependencies(mctx, tag, names)
if s.Enabled() {
for _, memberListProperty := range s.memberListProperties() {
names := memberListProperty.getter(s.dynamicMemberTypeListProperties)
tag := memberListProperty.dependencyTag
memberListProperty.memberType.AddDependencies(mctx, tag, names)
}
}
}
}