Introduce min_sdk_version to deps info.

Bug: 149622332
Test: m
Change-Id: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Merged-In: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 480e25b74f)
This commit is contained in:
Artur Satayev
2020-04-27 18:53:18 +01:00
parent fb0a636f6d
commit 388d39ba9a
5 changed files with 55 additions and 25 deletions

View File

@@ -694,10 +694,18 @@ func (a *apexBundle) buildApexDependencyInfo(ctx android.ModuleContext) {
info.IsExternal = info.IsExternal && externalDep
depInfos[to.Name()] = info
} else {
toMinSdkVersion := "(no version)"
if m, ok := to.(interface{ MinSdkVersion() string }); ok {
if v := m.MinSdkVersion(); v != "" {
toMinSdkVersion = v
}
}
depInfos[to.Name()] = android.ApexModuleDepInfo{
To: to.Name(),
From: []string{from.Name()},
IsExternal: externalDep,
To: to.Name(),
From: []string{from.Name()},
IsExternal: externalDep,
MinSdkVersion: toMinSdkVersion,
}
}
@@ -705,7 +713,7 @@ func (a *apexBundle) buildApexDependencyInfo(ctx android.ModuleContext) {
return !externalDep
})
a.ApexBundleDepsInfo.BuildDepsInfoLists(ctx, depInfos)
a.ApexBundleDepsInfo.BuildDepsInfoLists(ctx, proptools.String(a.properties.Min_sdk_version), depInfos)
ctx.Build(pctx, android.BuildParams{
Rule: android.Phony,