Hi,
I’m looking for a way to get just compile configuration dependencies from the command line. Barring that, can I do it with a task?
I tried both :
gradle dependencies compile
and:
task showCompileDep << {
println configurations.compile.dependencies }
but just starting off, so not working…
Thanks,
Mark
1 Like
Please use HTML ‘code’ tags for all code snippets.
task showCompileDep << {
println configurations.compile
}
Or, probably more readable:
task showCompileDep << {
configurations.compile.each { println it }
}
OK, sounds great, thanks. I’ll just use a special task. Would be nice to be able to do it from the command line, something like:
gradle dependencies.compile
Thanks again for the help!
I assume you are familiar with ‘gradle dependencies’.
Oh yes, was just thinking of a refinement to that functionality as the amount of text you get from that command is huge - being able to look at one configuration at a time would be very helpful.
You can create an instance of dependencyReportTask:
task compileDeps(type: DependencyReportTask) {
configurations = [project.configurations.compile] as Set
}
We’re looking at adding more command line support to the dependency report. There might be some new way of specifying a configuration in the dependency report in 1.3 or 1.4. Something like: ‘gradle dependencies --configuration compile’.
Thanks to everyone for the suggestions.
Thank you Szczepan, that is exactly what I was looking for. I also look forward to 1.3 or 1.4 for the functionality you mentioned.
Please consider this closed.
Best,
Mark