I have:
- library
X
with pure interfaces - libraries
X1
,X2
,X3
, ...,XN
which implement interfaces fromX
SpringBoot
projectY
built withGradle 4
and usingX
The implementation of X
depends on the client we prepare build for.
Options I have in mind:
- Conditional
Gradle
buildgradle build -Pclient=client1
which will include only one specific implementation - Include all implementation as dependencies and have configuration variable which will be discovered runtime and define used implementation.
Now there is a question what are the best practices to follow?