Accessing dependency information and file at the same time

Hey there,

i’m iterating over the dependencies like described in http://www.gradle.org/docs/current/userguide/dependency_management.html

configurations.alllife.dependencies.each { dep -> println dep.name }

will give me the dependencies with access to name, version, etc…

configurations.alllife.files.each { file ->
        println file.name
    }

will give me the dependencies files !

Is there a way to get file and dep together ?

(Sorry i’m no groovy wizard) Johannes

You need:

configurations.alllife.resolvedConfiguration.resolvedArtifacts

Which will give you a set of: http://www.gradle.org/docs/current/javadoc/org/gradle/api/artifacts/ResolvedArtifact.html

Thanks, that is working greatly!