Hello list,
This is my first message here, sorry if my question is going to be naive.
I'm trying to get the dependencies of a project so that I can copy them in
my package; the test I'm running now is just to print their path.
What I did is the following:
apply plugin: 'java'
repositories {
mavenCentral()
}
configurations {
compile
}
dependencies {
compile group: 'commons-digester', name: 'commons-digester', version:
'2.1', transitive: true
}
task print_dependencies(dependsOn: assemble) {
configurations.compile.files.each { file ->
println "$file.name -> $file.path"
}
}
The question is: how I can get rid of the "configurations" section? I mean,
isn't it a sort of duplication with the dependencies section?
I tried to use dependencies.compile.files.each but gradle told me that the
compile property wasn't found.
Any advice? Is there a better method to do it?
Thank you in advance
Ale