dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

`:reason` does not find runtimeOnly dependencies

Open joshfriend opened this issue 5 months ago • 2 comments

Plugin version 2.19.0

Describe the bug Runtime-only dependencies are not found by the reason task

To Reproduce Steps to reproduce the behavior:

  1. dagp-runtime-only-reason.zip
  2. ./gradlew :app:reason --id :utils
* What went wrong:
Execution failed for task ':app:reason'.
> A failure occurred while executing com.autonomousapps.tasks.ReasonTask$ExplainDependencyAdviceAction
   > Could not create an instance of type com.autonomousapps.tasks.ReasonTask$ExplainDependencyAdviceAction.
      > There is no dependency with coordinates ':utils' in this project.

Expected behavior reason for the dependency inclusion should be printed. I think DAGP ignores runtime only dependencies? But it should still print if a dependency provides any android manifests, activities, services, etc

joshfriend avatar Aug 06 '25 14:08 joshfriend

Thanks for the issue. I'm wondering if this is a bug or a feature request, but will treat it like a bug for now.

autonomousapps avatar Aug 07 '25 16:08 autonomousapps

Would classify as a bug, the dependency is there so it should not claim otherwise. I also wanted to see any of the runtimeonly type things that this dependency would provide (there are none in my repro, but was not the case in the real project)

joshfriend avatar Aug 07 '25 18:08 joshfriend