summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/android/module.go b/android/module.go
index 738f5435b..d7f0537f7 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1470,15 +1470,27 @@ func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]*DepSet[InstallPat
var installDeps []*DepSet[InstallPath]
var packagingSpecs []*DepSet[PackagingSpec]
ctx.VisitDirectDeps(func(dep Module) {
- if isInstallDepNeeded(dep, ctx.OtherModuleDependencyTag(dep)) {
+ depTag := ctx.OtherModuleDependencyTag(dep)
+ // If this is true, the direct outputs from the module is not gathered, but its
+ // transitive deps are still gathered.
+ skipToTransitive := IsSkipToTransitiveDepsTag(depTag)
+ if isInstallDepNeeded(dep, depTag) || skipToTransitive {
// Installation is still handled by Make, so anything hidden from Make is not
// installable.
if !dep.IsHideFromMake() && !dep.IsSkipInstall() {
- installDeps = append(installDeps, dep.base().installFilesDepSet)
+ if skipToTransitive {
+ installDeps = append(installDeps, dep.base().installFilesDepSet.transitive...)
+ } else {
+ installDeps = append(installDeps, dep.base().installFilesDepSet)
+ }
}
// Add packaging deps even when the dependency is not installed so that uninstallable
// modules can still be packaged. Often the package will be installed instead.
- packagingSpecs = append(packagingSpecs, dep.base().packagingSpecsDepSet)
+ if skipToTransitive {
+ packagingSpecs = append(packagingSpecs, dep.base().packagingSpecsDepSet.transitive...)
+ } else {
+ packagingSpecs = append(packagingSpecs, dep.base().packagingSpecsDepSet)
+ }
}
})