diff options
Diffstat (limited to 'apex/builder.go')
-rw-r--r-- | apex/builder.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apex/builder.go b/apex/builder.go index 2df380b5a..bbb4666e7 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -946,16 +946,19 @@ func (a *apexBundle) buildApexDependencyInfo(ctx android.ModuleContext) { depInfos[to.Name()] = info } else { toMinSdkVersion := "(no version)" - if m, ok := to.(interface{ MinSdkVersion() string }); ok { - if v := m.MinSdkVersion(); v != "" { - toMinSdkVersion = v + if m, ok := to.(interface { + MinSdkVersion(ctx android.EarlyModuleContext) android.SdkSpec + }); ok { + if v := m.MinSdkVersion(ctx); !v.ApiLevel.IsNone() { + toMinSdkVersion = v.ApiLevel.String() } - } else if m, ok := to.(interface{ MinSdkVersionString() string }); ok { - if v := m.MinSdkVersionString(); v != "" { + } else if m, ok := to.(interface{ MinSdkVersion() string }); ok { + // TODO(b/175678607) eliminate the use of MinSdkVersion returning + // string + if v := m.MinSdkVersion(); v != "" { toMinSdkVersion = v } } - depInfos[to.Name()] = android.ApexModuleDepInfo{ To: to.Name(), From: []string{from.Name()}, |