I'm working on spring boot microservices using Kotlin and Gradle. There is one base project called projBase. It has utilities which are being used in other microservices. Let's say projA, projB etc.
There are few external dependencies which are common among all the microservices(projA, projB) including the projBase. For example,
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
Problem Instead of adding them in all the microservices, I want a way to add them only once in projBase, publish the projBase to maven local, include projBase in projA, projB build.gradle.kts file and it should add all these external dependencies as well.
These external dependencies, for example mongo db are being used in projBase as well as the other microservices as well.
It will help me to maintain all the external libraries and their versions at one place.
I explored about the fat jar, and some DSL scripts but no luck.