autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

Make limit for reason task configurable

Open
#835 2 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

**Is your feature request related to a problem? Please describe.**

A large module has many classes depending on some other module, I want to use the reason task to find out which classes I need to look at. The task only returns the first five classes. This value is hardcoded:
https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/blob/07ceec90d6c2b6e0ac9f0d511eb8b1759cbad0e9/src/main/kotlin/com/autonomousapps/model/intermediates/Reason.kt#L244

**Describe the solution you'd like**

I would like to be able to configure the limit in this task. So I can set it to a higher value when needed for a specific module, without sacrificing performance on normal runs. Upping the limit for all `kinds` at the same time would be fine for me.

Something like:

```
./gradlew :module:reason --id :othermodule --limit 100
```

**Describe alternatives you've considered**

Going through the code by hand. But this would take too long if there's many dependencies. IntellIJ's dependency analysis also works for this.

**Additional context**

Contributor guide

Open the contributing guide

Research direction

Start with com/autonomousapps/model/intermediates/Reason.kt around line 244 and trace how the reason task accepts its options. Run the existing reason task with the reported module and id, then verify that a configurable --limit can raise the result cap without changing the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.