How to map an Artifact from ModuleDependency to configuraion.files(dep)?

i have a plugin which is a generic resource retrival from artifactory, meaning you can assign any dependency such as pdf or raw resources and copy them to a directory defined in a closure. Recently i needed to copy the dependency to a directory with the artifact specific classifier, so i cannot just run all over all the files in my configuration and copy them since i don’t know their classifier. i can check my dependencies and see if they are instanceof ModuleDependency and then iterate over Artifacts, but then i can’t access the files. Anyway to get this working ? get a map of Dependency + Artifact data to file ?

Would the ‘ResolvedArtifact’ interface give you all the information you need?

configurations.compile.resolvedConfiguration.resolvedArtifacts.each {

if (it.classifier == ‘foo’) {

// process it.file

}

}

That does the trick indeed!!!