Dynamically specifying dependency - get artifact from repo if project does not exist

I want to be able to specify a dependency as another project but if that project does NOT exist it gets the artifact from a repository.

This is for development purposes. All our builds will publish their artifacts to a snapshot dependency. So if you are working on some component then you do NOT have to download all the code for it’s dependents and thus get the dependency from the snapshot repository.

This has been discussed here with a couple of solutions including 1. prezi pride 2. elastic dependencies

This is also being added to Gradle core by Lóránt, but I’m not sure which release will have it yet. You can see some rumblings about it on gradle-dev.