How can I get a list of dependencies for a given project programmatically? For instance: I’ve a plugin, and when it’s applied I get access to project instance. How can I check using this project instance if some dependencies were already added? I know that I can access ‘dependencies’ property with ‘project’ but have no idea where to go from here…
In gradle dependencies are organized in configurations. To access all dependencies for a configuration you can simply call
project.configurations.compile.allDependencies
cheers, René
Yeah, thanks! Thats is exactly what is was looking for!