How to add extra metadata to configuration dependency?

Hello,

I’m trying to add additional metadata (property) to a configuration dependency via a closure but it doesn’t
appear to be working?

// CODE SNIPPET START
...
// SET PROPERTY
dependencies {
    compile('com.group:good-stuff:1.+') {
        ext.foo = true
    }
}
...
// CHECK PROPERTY
configuration.allDependencies.findAll {
    it.group == group && it.name == name && it.version == version
}.each {
    if (it.hasProrperty('foo') && it.foo) {
        foo = true
        return true // stop looking
        }
}
...
// CODE SNIPPET END

Any assistance is appreciated!

Thanks in advance,
Jim

there is a typo here. apart from that it should work. just tested it locally on my box.

Awesome, thanks Rene! Jim