autonomousapps / dependency-analysis-gradle-plugin

Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.77k stars 116 forks source link

Any Plans for Dependency Raker? #1249

Closed macgills closed 1 month ago

macgills commented 1 month ago

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

The plugin is amazing but can be really tedious to work with as the number of modules grow and you try to keep your dependencies in order and sometimes the advice is incorrect as not every edge case can be accounted for.

Describe the solution you'd like

Slack have already solved this with Dependency Raker https://slackhq.github.io/slack-gradle-plugin/dependency-rake/ but it is in an unpublished plugin and I think it being included in this project or closely related one would have a lot of benefit to the community.

Describe alternatives you've considered

N/A

Additional context

N/A

autonomousapps commented 1 month ago

I'm pretty sure that this plugin has that same functionality already baked in (correct me if I'm wrong). You can run

./gradlew fixDependencies [--upgrade]

and it will automatically apply all the advice from buildHealth / projectHealth. It can fail if it has trouble parsing your build scripts.

macgills commented 1 month ago

I believe the difference is that with Dependency Raker the advice is iteratively applied line by line and if the advice produces a failed build then that particular line is not applied and it moves on leaving working builds with all useful advice applied. Compose dependencies often have wrong advice, think the runtimeOnly ticket is in the latest milestone but also a lot of other projects I have worked on have had weird issues despite the majority of the advice being spot on

autonomousapps commented 1 month ago

Can you link to the issues you're referring to regarding compose?

I don't have any plans to integrate dependency raker. I am open to contributions, however.

macgills commented 1 month ago

https://github.com/autonomousapps/dependency-analysis-gradle-plugin/issues/888

I would be slightly concerned about stepping on Slack’s toes, dunno if @ZacSweers would care to chime in, I believe he has contributed to this project a fair amount

ZacSweers commented 1 month ago

I wouldn't say we've solved that problem, we don't use it currently as we have a lot of multiplatform dependencies and unfortunately this plugin doesn't cover those yet :/