What is the best way or a good way to handle depen...
# gradle
p
What is the best way or a good way to handle dependency versioning across multiple projects. Each project has its independent repo and exposes an aar, they are not modules in a single project. I am thinking of moving the common dependencies to a common project and expose them as api. The problem is that now, all projects need to depend on this common library, which is not necessarily what the business requires. Any recommendation?
Perhaps making an internal gradle convention plugin that has a file with the versions and apply them to each individual project🤔
w
You may want to look into publishing a bom via java platform: https://docs.gradle.org/current/userguide/java_platform_plugin.html That way you can share the versions but let each project decide which dependencies it pulls
p
Thanks for answering guys, they both sounds good. Any advantage/disadvantage of using java-platform plugin versus version-catalog.
Never mind, I found the answer in gradle official docs.