Dependency Management - Best Practices for Naming Gradle Version Catalog Entries

Version catalogs are a fairly recent feature in Gradle Build Tool. They help manage dependencies by providing a standardized way of defining and accessing the catalog of dependencies used in a project—ensuring that all developers in a team are aligned on dependency names and definitions saves time and cognitive load for everyone. Like most Gradle features they are quite flexible, so users have to come up with their own conventions for how to use them.


This is a companion discussion topic for the original entry at https://blog.gradle.org/best-practices-naming-version-catalog-entries

It’s possible to use either dashes or underscores to separate segments in the entry. The recommendation according to the Gradle documentation is to use a hyphen.

“hyphen” sounds like a third option here, although it’s just used synonymous to “dash”. I’d recommend to just stick with “dash” consistently.

1 Like

And in the third code block is a typo, lib. vs. libs.. :slight_smile:
This was fixed. :slight_smile:

Just fixed it indeed :slight_smile:

Looking into that other comment, as it makes sense to me.

2 Likes