Gradle 6 introduces Gradle Module Metadata as a solution to automatic dependency version alignment across multi-module libraries. Using Jackson as a case study, the post explains how mismatched versions of related modules (e.g., jackson-core vs jackson-databind) arise when BOM metadata isn't automatically applied. With Gradle Module Metadata, each module publishes a platform dependency pointing to its BOM, allowing Gradle to automatically resolve version conflicts and align all modules to the highest selected version. For libraries not yet publishing this metadata, Gradle 6 component metadata rules can patch the missing information. Library authors using Gradle 6+ or Maven can adopt this pattern following JUnit 5 and Jackson as reference implementations.
Table of contents
Table of ContentsIntroductionBOMs are great, but we don’t use them (enough) #The missing link: Platform dependencies on BOMs #The Gradle Module Metadata answer #Adding the missing bits to existing Jackson metadata #Publishing your library with alignment #Conclusion #DiscussSort: