autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

`:reason` does not find runtimeOnly dependencies

Open
#1,509 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

**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](https://github.com/user-attachments/files/21621143/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

Contributor guide

Open the contributing guide

Research direction

Start with the attached dagp-runtime-only-reason.zip reproduction and run ./gradlew :app:reason --id :utils to observe ReasonTask$ExplainDependencyAdviceAction. Trace the :app:reason entry point and determine why the runtime-only :utils dependency is not recognized; done means the reason for its inclusion is printed, including Android manifests, activities, or services.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.