Does the following script (which I tested with 0.9-preview-3) do what you
want? (And how does it differ from your own solution? I wouldn't directly
call it unelegant.)
apply plugin: 'java'
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.6.0'
}
task listDependencies << {
configurations.compile.getAllDependencies(ExternalDependency).each
{dependency ->
configurations.compile.files(dependency).each {file ->
println
"${dependency.group}:${dependency.name}:${file.name.split('\\.')[-1]}
= ${file.canonicalPath}"
}
}
}
On Sun, Jul 18, 2010 at 6:39 AM, Paul Gier <[email protected]> wrote:
> I have a set of compile dependencies, and I would like to generate
> properties that look like this:
> group:name:type = /path/to/jar
>
> For example a junit dependency would give something like
> junit:junit:jar = /home/me/.gradle/junit/junit-4.3.jar
>
> I'm able to get the dependency linked to the file using a combination of
> configurations.compile.files and configurations.compile.dependencies but
> it's not very elegant, and I can't figure out how to get the file type.
> Is there an easy way to do this?
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>