Reputation: 118
I have:
X
with pure interfacesX1
, X2
, X3
, ..., XN
which implement interfaces from X
SpringBoot
project Y
built with Gradle 4
and using X
The implementation of X
depends on the client we prepare build for.
Options I have in mind:
Gradle
build gradle build -Pclient=client1
which will include only one specific implementationNow there is a question what are the best practices to follow?
Upvotes: 2
Views: 447
Reputation: 84766
Both mechanisms of handling the presented problem are more or less equivalent. I find including only single dependency (namely XN) not only easier to implement using this technology stack but also more reliable:
Two important things here:
war
level or in dependencies
block. Personally I'd go for dependencies block - it make war
easier to build.Upvotes: 1