dependency-analysis-gradle-plugin
dependency-analysis-gradle-plugin copied to clipboard
Advice to display Version Catalog aliases
Fix #794
To allow advice to display the Version Catalog aliases we can iterate through each alias and add a mapping of the alias to the dependency in the DependencyHandler#map extension. Followed the recommendations from @daanschipper and @autonomousapps described in the issue.
I didn't add any functional tests, since it's fairly simple and safe, but I'm open to doing so.
A full working repository to demonstrate the issue is located here
buildHealth output before the changes:
Advice for root project
Dependencies which should be removed or changed to runtime-only:
runtimeOnly("ch.qos.logback:logback-classic:1.2.6") (was implementation)
buildHealth output after the changes:
Advice for root project
Dependencies which should be removed or changed to runtime-only:
runtimeOnly(libs.logback.classic) (was implementation)
Thanks for the PR!
@autonomousapps I started to implement a functional test (mirroring the test harness I created under https://github.com/Chasson1992/DependencyAnalysisTest).
I'm developing on a Windows 10 machine with IntelliJ Ultimate but when running the functionalTest task I'm getting a bunch of expections from:
Caused by: java.io.IOException at FileUtils.java:1344
Caused by: java.nio.file.FileSystemException at WindowsException.java:92
I've been having a hard time figuring out the issue on this one. Any suggestions? I'll push what I have currently to my fork.
I've been having a hard time figuring out the issue on this one. Any suggestions? I'll push what I have currently to my fork.
Can you post more of the stacktrace? TBH I don't develop at all on Windows, so I'm not sure I'll be able to help, but at the least I'd need the full stacktrace.