How get ExtensionProperty from ExternalModuleDependency

Hey there,

I’m busy writing a plugin in Java and I’m trying to get an ExtensionProperty off an ExternalModuleDepenendency. Can you please tell me how to do this?

dependencies {
    api(group: 'commons-io', name: 'commons-io', version: '2.9.0'){
        ext.set("someKey","someValue")
    }
}

I get the ExternalModuleDependency off the Project → Configuration → Dependencies. But then I have no idea how to get the ExtensionProperty from the Dependency.

project.getConfigurations()
                    .named(configuration).get()
                    .getDependencies().forEach(dependency ->{})

Thx