Closed vanniktech closed 2 years ago
I did see this and looked into it last week. It's been super busy and I wasn't able to dig in deep. Were you able to figure out a way around this?
Nope.
The tree is written by the official Gradle :dependencies
task
https://github.com/dropbox/dependency-guard/blob/d5f24207d66f77ed11ac9ad6013348aae556a908/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/tree/DependencyTreeDiffTask.kt#L7
I just set the outputFile
variable they expose, then read in that file and do the comparison
https://github.com/dropbox/dependency-guard/blob/d5f24207d66f77ed11ac9ad6013348aae556a908/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/tree/DependencyTreeDiffTask.kt#L39
I don't "sort" at all. I am using a copy/paste of Jake's dependency-tree-diff
library (because it's not available as a JAR)
So, I'm stumped. Maybe it could be an incompatibility between the :dependencies
file output between versions of Gradle? 🤷 .
I'm going to close as "Can't reproduce", but thank you for reporting. Happy to reopen if we can find an easy way to repro/debug.
This is a bit of a weird one. The
dependencyTreeDiffReleaseRuntimeClasspath
tasks fails for me. However it's only on CI. This issue started happening with these changes (adding the plugin to more modules): https://github.com/vanniktech/Emoji/commit/3fe08a3f16a7c1adaacdfb5107a7e4feba91cef7This is the CLI output:
Running the task locally just works for me:
Could it be that dependencies are differently sorted on that particular machine and the tree diffing gets confused?