

This code snippet shows how to define the plugin in the version catalog file: Īndroid-application = block with using version catalogs. This code snippet shows the file before removing the Sync your project, and then replace theirĭeclarations in the build files with their catalog names.

You use these variables in the subsequent blocks

In the versions block, define variables that hold the versions of yourĭependencies and plugins.Note: It's possible to change the catalog file name however, this requiresĬhanging your build files, so we don't recommend doing it. In your root project's gradleįolder, create a file called. Start by creating a version catalog file. To learn more, see the Gradle documentation. This page provides basic information about migrating your Android app to Version catalog of dependencies that various modules can reference inĪ type-safe way with Android Studio assistance. Instead of hardcodingĭependency names and versions in individual build files and updating eachĮntry whenever you need to upgrade a dependency, you can create a central Using Gradle version catalogs makes managing dependencies and plugins easier Enable you to add and maintain dependencies and plugins in a scalable way.
