summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-01-13 15:57:07 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-01-13 15:57:07 -0800
commitf920cc5d8e967ec9359269dbde084eed5b979118 (patch)
treea5146d950181d5710533b9270a33529fd96fcb1c /api/api.go
parent816c7b4c30dc1da4ee74610fbef934aee3c216fe (diff)
parentd3614e040d596cf6fa4435a43ddbfbfe8563a59f (diff)
Merge "Change CombinedApis to actually use WalkDepsProxy, also uses the newly added AndroidLibraryDependencyInfo." into main
Diffstat (limited to 'api/api.go')
-rw-r--r--api/api.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/api/api.go b/api/api.go
index b8f30a242320..da75e05673e2 100644
--- a/api/api.go
+++ b/api/api.go
@@ -102,8 +102,9 @@ func (a *CombinedApis) DepsMutator(ctx android.BottomUpMutatorContext) {
}
func (a *CombinedApis) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- ctx.WalkDeps(func(child, parent android.Module) bool {
- if _, ok := android.OtherModuleProvider(ctx, child, java.AndroidLibraryInfoProvider); ok && child.Name() != "framework-res" {
+ ctx.WalkDepsProxy(func(child, parent android.ModuleProxy) bool {
+ javaInfo, ok := android.OtherModuleProvider(ctx, child, java.JavaInfoProvider)
+ if ok && javaInfo.AndroidLibraryDependencyInfo != nil && child.Name() != "framework-res" {
// Stubs of BCP and SSCP libraries should not have any dependencies on apps
// This check ensures that we do not run into circular dependencies when UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true
ctx.ModuleErrorf(