autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

[Question] Report only with unused libraries

Open
#803 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

First, thanks for your dedication @autonomousapps I've been using this excellent plugin for a couple of years, and what a help!

Today I was trying to run the plugin to identify unused libraries and get suggestions for the transitive dependencies from the unused libraries, instead of getting the entire list of transitive dependencies also including the used dependencies.

Setting the `onUsedTransitiveDependencies` to `ignore` will suggest removing unused without telling the transitive dependencies from them.

To be more clear, let me give an example:

- Project Manhattan depends on Library A and Library A depends on Library B, Library B class is used on Project Manhattan, but nothing from Library A.
- Project Manhattan depends on Library C and Library C depends on Library D, Library C, D class is used on Project Manhattan.

Expected output:

```
Advice for: Project Manhattan
Unused dependencies which should be removed:
implementation(project(":library:a"))

Transitively used dependencies that should be declared directly as indicated:
implementation(project(":library:b"))
````

Contributor guide

Open the contributing guide

Research direction

The issue describes dependency advice for the dependency-analysis Gradle plugin, using the onUsedTransitiveDependencies setting and an expected output example. Start by tracing how unused and transitively used dependencies are reported, then verify that the output distinguishes dependencies like libraries A and B from used dependencies like C and D.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.