0

I have a setup of (at least) two development projects (A and B) and a shared API

A is core and implements the API

B is integration and uses the API

The projects are separate in that I can deploy each separately. They are also in two separate repositories.

Use case 1: I'm working in core and only wants to see the released version of the API

Use case 2: I'm working on integration and only want to use the released version of API

Use case 3: I'm developing the API and want the source of both core (A) and integration (B)

You would need three completely separate builds. In use case 1 and 2 I would like to use a maven dependency, where I in use case 3 would like to use a gradle project dependency.

How would you setup your gradle builds to this (very common?) usage?

NOTE:

A way to think of it is when opening an IDE. In use case 1 and 2, the IDE would open the source of core and integration respectfully and using a jar-file dependency for API. For use case 3 the IDE would have sources for core, integration, and API (all three repos open)

Community
  • 1
  • 1
mathiasbn
  • 881
  • 11
  • 21
  • I think of an API as a kind of specification - maybe a set of interfaces. If A implements it, why You need to sources of A in API? – Opal Jan 24 '15 at 21:44
  • When you are working with the API (and not only one or the other side), you want to refactor among other things. (It's not an external API). If API is a misleading word, then think of abstract module whose intent is inversion of control – mathiasbn Jan 26 '15 at 09:15

0 Answers0