Convert Visit*Deps from blueprint.Module to android.Module
Also adds checks that the dependencies are android.Modules and are not disabled. Test: m checkbuild Change-Id: I05e945f38915d49cd3c0ab72a86576949bc7eff2
This commit is contained in:
17
java/java.go
17
java/java.go
@@ -406,25 +406,10 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
|
||||
deps.aidlIncludeDirs = append(deps.aidlIncludeDirs, sdkDep.aidl)
|
||||
}
|
||||
|
||||
ctx.VisitDirectDeps(func(module blueprint.Module) {
|
||||
ctx.VisitDirectDeps(func(module android.Module) {
|
||||
otherName := ctx.OtherModuleName(module)
|
||||
tag := ctx.OtherModuleDependencyTag(module)
|
||||
|
||||
aDep, _ := module.(android.Module)
|
||||
if aDep == nil {
|
||||
ctx.ModuleErrorf("module %q not an android module", ctx.OtherModuleName(aDep))
|
||||
return
|
||||
}
|
||||
|
||||
if !aDep.Enabled() {
|
||||
if ctx.AConfig().AllowMissingDependencies() {
|
||||
ctx.AddMissingDependencies([]string{ctx.OtherModuleName(aDep)})
|
||||
} else {
|
||||
ctx.ModuleErrorf("depends on disabled module %q", ctx.OtherModuleName(aDep))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
dep, _ := module.(Dependency)
|
||||
if dep == nil {
|
||||
switch tag {
|
||||
|
Reference in New Issue
Block a user