Depend on either project or maven artifact (in case of the project isn't locally available)


I have a situation in which a team will be working in different system modules (different projects) at the same time. I wouldn’t like to require the developer to download all the modules projects from SCM if he doesn’t plan to change it. Currently, using Maven along with M2Eclipse plugin, we’re able to declare a dependency to another module as an artifact, and if this project itself is available on workspace, then it will be referred on classpath instead.

Is there a way to declare a dependency to a project on Gradle, and an alternative artifact if it’s not found perhaps?

for example project(“project-service”) OR “”

Thank you

This is something we want to support in the not too distant future. Right now you’d have to script a solution yourself. If it’s just about the dependency, you can simply use an if-statement (preferably using a helper method).