Parent project to make compile project dependencies in IDE only for otherwise decoupled projects

Hi there,

let’s assume we have two projects: * foo-library * bar-service ** has a compile time dependency to released version of foo-library: ‘dependencies { compile “example:foo-library:0.10.0” }’

Usually, these projects are developed, built and released independently (no multi-project build). Now, we want to do some heavy refactoring and development on both projects for some time. To make this easy and to skip the upload-snapshot-refresh-dependencies cycle, it would be great to change the artefact dependency to a project dependency: ‘dependencies { compile project(":foo-library") }’

Every release of the bar-service should still depend on a released version of foo-library, though.

Is there a best practice to switch between these modes of dependency? E.g., can I use a project dependency when building from a “parent project” during development, but still retain the artefact dependency when building the “child project” for release?

Any hints would be much appreciated.

Best regards Michael

Is each of the projects in it’s own SVN or GIT repository? If so, Pride can help

@Lance: thanks a lot for your hint. Yes, they are in independent git repositories. I checked out Pride and it looks very interesting.

For completeness:

It seems, there was already a discussion about this problem before:

There was also an implementation of elastic dependencies by Peter Niederwieser: