libyear-gradle-plugin
libyear-gradle-plugin copied to clipboard
Add `maxTransitiveDepth` config
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
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 🤔
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.
Thank you very much @Breefield 💯
@Breefield plugin v0.2.0 just appeared on Gradle plugin portal - can you confirm the publishing went fine and everything works as expected?
Confirmed I can use this in my project now, with the default being 0