Using Gradle Platform/BOM to resolve dependencies in projects

Hello Gradle community,

I have set up a Gradle platform/BOM to manage dependencies and versions across multiple microservices. In my microservice projects, I include the platform/BOM and list the required dependencies in the dependencies.gradle file.

However, I’m facing an issue where multiple versions of the same dependency are being resolved in a single microservice. I want to enforce a single version for each dependency across the microservice which is specified in the BOM/platform. Notably, one version is coming from the impl folder, and another from the rest folder, creating conflicts.

I’ve attempted to use the resolutionStrategy in the microservices build.gradle to force specific versions, but it doesn’t seem to be working as expected.

Could you please provide guidance on the best practices for ensuring a single version of each dependency in a microservice when utilizing a Gradle platform or BOM, especially when dependencies are coming from different folders within the microservice project?

Thanks,
Shubham