Is there the way outputs all dependencies with or ...
# gradle
y
Is there the way outputs all dependencies with or without updates using gradle-versions-plugin ?
t
you could try to use
dependencies
task from Gradle
y
Ah, I see. Thanks. But I want to format the output like JSON. Do you know how to format using it?
t
it is not possible with this task 🤷‍♂️
👍 1
btw why
dependenciesUpdates
json report is not fit for you?
y
Thanks again! I think it only output those with updates. I want to know the dependent library versions I’m using for all the modules.
t
no, check documentation again - it also outputs dependencies that don't have updates
y
Oh! Really! I’ll check again!
v
There is also the built-in
HtmlDependencyReportTask
to generate an HTML report
And actually that has the dependency tree as JSON inside
Or you could write an own report task like the html one and output JSON directly
t
what is the name of this
HtmlDependencyReportTask
? 🤔
v
Whatever name you give it
Ah, no, there is indeed one created by default called
htmlDependencyReport
t
Gradle 6.8 could not find this task 🤔
v
Apply the
project-reports
plugin
Or define a task of that type yourself
The plugin will add a
taskReport
task, a
propertyReport
task, a
dependencyReport
task, an
htmlDependencyReport
task, and a
projectReport
task.
t
yes, adding this plugin was a missing part 👍 Today I learned such plugin exists 😅
v
Me too 😄
It is not even documented, but I've seen it in the sources
After I have seen the task type in the DSL docs
Ah, it is, just not in the single-page version: https://docs.gradle.org/current/userguide/project_report_plugin.html