gradle-version-catalog

Centralize Gradle dependency versions in a libs.versions.toml catalog.

Updated Jan 23, 2025
One-click install
npx skills add https://github.com/ymkz/demo-monorepo --skill gradle-version-catalog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gradle-version-catalog
Source: https://github.com/ymkz/demo-monorepo/tree/main/.agents/skills/gradle-version-catalog
Command: npx skills add https://github.com/ymkz/demo-monorepo --skill gradle-version-catalog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes the management of Gradle dependency versions across a multi-module project using a version catalog.

Core Features & Use Cases

  • Centralizes version definitions in gradle/libs.versions.toml
  • Enables consistent dependency versions across subprojects
  • Simplifies upgrades and reduces drift across teams

Quick Start

Create a libs.versions.toml catalog and update builds to reference it for consistent versions.

Frequently Asked Questions about gradle-version-catalog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I centralize Gradle dependency versions across a multi-module project?

To centralize Gradle dependency versions, create a libs.versions.toml file and reference it in your build scripts. This establishes a single source of truth for consistent versions across all subprojects.

What is a Gradle version catalog and when do I need it?

A Gradle version catalog is a centralized dependency management mechanism using a TOML file. You need it for multi-module projects when you want to enforce version alignment and reduce version drift across teams.

Does centralizing Gradle versions require Kotlin DSL?

Centralizing Gradle versions with a catalog requires a valid libs.versions.toml file and proper Gradle configuration. The catalog can be applied in build scripts to enforce version alignment regardless of using Kotlin DSL or Groovy.

What's the best way to simplify dependency upgrades and reduce drift in Gradle?

The best way to simplify upgrades and reduce drift is to centralize version definitions in a single libs.versions.toml file. Updating the catalog automatically propagates changes across all modules referencing it.

How do I configure a libs.versions.toml file for my subprojects?

To configure a libs.versions.toml file for subprojects, define your versions, libraries, and bundles inside the TOML file located in the gradle directory. Then apply the proper Gradle configuration to reference the catalog in your build scripts.

Why should I use a version catalog instead of managing dependencies directly in build scripts?

You should use a version catalog to enforce version alignment across multi-module Gradle projects. Managing dependencies directly in build scripts causes version drift, whereas a TOML catalog provides a single source of truth for versions.