summaryrefslogtreecommitdiff
path: root/apex/builder.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2024-12-09 18:46:20 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-12-09 18:46:20 +0000
commit53aecd8c70ef23dbfa4f7a035d7e95e3f428521b (patch)
treef2a4ada0585b3c12435d92066b7696f2fdcaa659 /apex/builder.go
parent5493d23a0fcb89a2639b2d9d6b1d11c7d7610198 (diff)
parentc8914a47c160b0fe21a6a19bc26dffa0ac3e806f (diff)
Merge "Convert buildApexDependencyInfo to use ModuleProxy." into main am: c8914a47c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3393476 Change-Id: I1fbd5340b612e33c31f4fec1486e55eafe0d710d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'apex/builder.go')
-rw-r--r--apex/builder.go16
1 files changed, 4 insertions, 12 deletions
diff --git a/apex/builder.go b/apex/builder.go
index 41e251156..e522ab665 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -1037,7 +1037,7 @@ func (a *apexBundle) buildApexDependencyInfo(ctx android.ModuleContext) {
}
depInfos := android.DepNameToDepInfoMap{}
- a.WalkPayloadDeps(ctx, func(ctx android.BaseModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool {
+ a.WalkPayloadDepsProxy(ctx, func(ctx android.BaseModuleContext, from, to android.ModuleProxy, externalDep bool) bool {
if from.Name() == to.Name() {
// This can happen for cc.reuseObjTag. We are not interested in tracking this.
// As soon as the dependency graph crosses the APEX boundary, don't go further.
@@ -1046,7 +1046,7 @@ func (a *apexBundle) buildApexDependencyInfo(ctx android.ModuleContext) {
// Skip dependencies that are only available to APEXes; they are developed with updatability
// in mind and don't need manual approval.
- if to.(android.ApexModule).NotAvailableForPlatform() {
+ if android.OtherModuleProviderOrDefault(ctx, to, android.CommonModuleInfoKey).NotAvailableForPlatform {
return !externalDep
}
@@ -1064,16 +1064,8 @@ func (a *apexBundle) buildApexDependencyInfo(ctx android.ModuleContext) {
depInfos[to.Name()] = info
} else {
toMinSdkVersion := "(no version)"
- if m, ok := to.(interface {
- MinSdkVersion(ctx android.EarlyModuleContext) android.ApiLevel
- }); ok {
- if v := m.MinSdkVersion(ctx); !v.IsNone() {
- toMinSdkVersion = v.String()
- }
- } else if m, ok := to.(interface{ MinSdkVersion() string }); ok {
- // TODO(b/175678607) eliminate the use of MinSdkVersion returning
- // string
- if v := m.MinSdkVersion(); v != "" {
+ if info, ok := android.OtherModuleProvider(ctx, to, android.CommonModuleInfoKey); ok {
+ if v := info.MinSdkVersion; v != "" {
toMinSdkVersion = v
}
}