libyear-gradle-plugin icon indicating copy to clipboard operation
libyear-gradle-plugin copied to clipboard

Add `maxTransitiveDepth` config

Open Breefield opened this issue 1 year ago • 1 comments
trafficstars

What

Add a flag maxTransitiveDepth to allow folks to only get the libyears of the "root" dependencies they define in their project, or a X levels of transitive dependencies. Setting it to 0 means only root deps. 1 is root + their dependencies, etc.

Why

These are the dependency upgrades we have the most control over, and are also the ones tools like Renovate or Dependabot will inspect + recommend upgrades for. Knowing that my frameworks relies on a library that relies on a library 5 layers deep that is 10 years old doesn't really help me as much as knowing that my framework itself is 5 years old when there's a version avail that's 1 year old, etc.

Relevant Issue: https://github.com/f4lco/libyear-gradle-plugin/issues/15

TODO:

  • [ ] Update README.md before merge if this implementation is acceptable
  • [x] Add tests

Breefield avatar Oct 03 '24 21:10 Breefield

Hm, I see actions are failing tests which I’ll be able to look at later however I am wondering why the individual commit isn’t marked with the fail 🤔

Breefield avatar Oct 06 '24 16:10 Breefield

I updated the default to be 0 and documented that in the README. The property is now optional and if set to null the dependency traversal depth is unlimited.

Breefield avatar Oct 16 '24 05:10 Breefield

Thank you very much @Breefield 💯

f4lco avatar Oct 16 '24 06:10 f4lco

@Breefield plugin v0.2.0 just appeared on Gradle plugin portal - can you confirm the publishing went fine and everything works as expected?

f4lco avatar Oct 16 '24 07:10 f4lco

Confirmed I can use this in my project now, with the default being 0

Breefield avatar Oct 16 '24 21:10 Breefield