Automated cleanup of deprecated dependencies listed in a multi-product build.gradle?

Is there an automated way to validate the need for the items in a given

Context: In large multi-product projects, files can potentially get out of date as code is removed from a project, but the project’s are not maintained. For example lets say a compile time dependency was listed on another project in a multi-project, but over time it’s usages have been deleted, but the deprecated dependcy is still listed unnecessarily in the

Is there an automated way to fish out this waste?

gradle-dependency-analyze plugin finds unused dependencies. gradle-versions-plugin finds dependency version updates.