DevTools Logo

Gradle Version Catalog Builder

Gradle Version Catalog Builder

Generate libs.versions.toml with valid aliases and copy-ready Gradle snippets.

Runs in your browser
Try an example

Enter versions, libraries, bundles and plugins in a compact line format and get a correctly ordered TOML catalog plus the exact Kotlin DSL or Groovy snippets for each alias. The builder enforces Gradle's alias grammar, spots dash/dot accessor collisions and undefined version references, and maps aliases such as androidx-core-ktx to libs.androidx.core.ktx. Paste an existing TOML to hydrate the tables, or scan a build script for implementation("group:artifact:version") calls. All processing is local.

Worked examples
  • AndroidX core with a version reference — Produces version.ref = "core" in [libraries] and the snippet implementation(libs.androidx.core.ktx).
  • Bundle of Compose artifacts — [bundles] gets a compose array and the accessor libs.bundles.compose installs every listed library with one implementation call.
  • Kotlin Android plugin in settings.gradle.kts — Emits [plugins] with version.ref and the snippet alias(libs.plugins.kotlin.android) apply false for the root build file.

Catalog entries

4 lines · 3 chars

core = 1.12.0

androidx-core-ktx = androidx.core:core-ktx @$core

compose = compose-ui, compose-material3

kotlin-android = org.jetbrains.kotlin.android @$kotlin

Use @$name for a version reference, @1.2.3 for an inline version, or omit it for none.

libs.versions.toml

0 libraries · 0 bundles

Enter catalog entries to generate TOML

Try the Typical Android catalog example.

Examples

AndroidX core

Input
core = 1.12.0
androidx-core-ktx = androidx.core:core-ktx @$core
Output
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "core" }
implementation(libs.androidx.core.ktx)

Dashes in the alias become dots in the generated accessor; the version lives in [versions] so several libraries can share it.

A Compose bundle

Input
compose = compose-ui, compose-material3
Output
compose = ["compose-ui", "compose-material3"]
implementation(libs.bundles.compose)

One implementation call installs every alias in the bundle, keeping build files short.

Plugin applied with apply false

Input
kotlin = 1.9.24
kotlin-android = org.jetbrains.kotlin.android @$kotlin
Output
alias(libs.plugins.kotlin.android) apply false

The root build file declares the plugin version without applying it; subprojects then apply the plugin by id.

About this tool

The Gradle Version Catalog Builder generates libs.versions.toml from a compact line-based editor: versions, libraries, bundles and plugins. It emits [versions], [libraries], [bundles] and [plugins] in stable order, quoting TOML strings correctly and choosing version.ref, inline version or no version per library. Alongside the file you get the exact Gradle snippet for every alias — implementation(libs.androidx.core.ktx), implementation(libs.bundles.compose), alias(libs.plugins.kotlin.android) apply false — in Kotlin DSL or Groovy.

Gradle's accessor grammar is the hard part and the builder enforces it. Aliases must be lowercase with single -, . or _ separators; camelCase and doubled separators are rejected, and two aliases whose dotted accessors collide (foo-bar beside foo.bar) are flagged before they reach your build. Version references must exist, bundle members must be declared libraries, and reserved first segments such as libs or plugins get a warning.

Use the quick-entry notation: `name = group:artifact @$versionRef` for a referenced library, `@1.2.3` for an inline version, or no @ at all for a library whose version comes from a platform constraint. The parser also reads an existing catalog back, so you can rename a version and have every reference updated, and it can scan a build script for literal implementation("g:a:v") calls to bootstrap a catalog from an existing project.

Everything runs in your browser. No dependency metadata is fetched from registries — versions are the values you type, and the only download is libs.versions.toml itself.

What this tool does not do

  • No registry access: the tool never checks whether a version or module actually exists on Maven Central.
  • Import handles catalog-shaped TOML (string values, inline tables and arrays), not arbitrary TOML with nested tables outside the four known sections.
  • Mass import only recognizes literal implementation("g:a:v") calls; Kotlin variables and BOM-managed dependencies must be entered manually.

How to use this tool

  1. Declare versions

    Enter one `name = value` per line, using lowercase dashed names such as kotlin or androidx-core.

  2. Add libraries and plugins

    Write `alias = group:artifact @$versionRef` for libraries and `alias = plugin.id @$versionRef` for plugins. Use @1.2.3 for an inline version.

  3. Group libraries into bundles

    Write `bundleName = alias1, alias2`. Bundle members must be declared libraries; the accessor becomes libs.bundles.bundleName.

  4. Copy the TOML and snippets

    Download libs.versions.toml into gradle/, toggle Kotlin DSL or Groovy for the snippet list, and copy the accessors into your build files.

Use cases

Bootstrap a modern Android project

Create a correct catalog in seconds with valid aliases and the matching Kotlin DSL snippets for each dependency.

Standardize dependencies across modules

Centralize versions and bundles so every module uses the same coordinates and accessor names.

Audit an existing catalog

Paste your current TOML, spot ambiguous aliases and missing references, then rename a version everywhere at once.

Write documentation and course examples

Generate accurate accessors instead of hand-translating dashes to dots in teaching material.

Quick-entry notation

LineMeaning
core = 1.12.0A version named core
ktx = androidx.core:core-ktx @$coreLibrary with version.ref = "core"
retrofit = g:a @2.11.0Library with an inline version
plain = g:aLibrary without a version (platform/BOM controls it)
compose = ui, material3Bundle of two declared libraries
kotlin-android = org.jetbrains.kotlin.android @$kotlinPlugin with a version reference

Sections are emitted in spec order: [versions] → [libraries] → [bundles] → [plugins]. The file normally lives in gradle/libs.versions.toml.

Common mistakes

Mistake:Using camelCase aliases such as androidxCoreKtx.

Fix:Gradle requires lowercase aliases with -_. separators. Use androidx-core-ktx; the generated accessor is libs.androidx.core.ktx.

Mistake:Declaring foo-bar and foo.bar in the same catalog.

Fix:Both normalize to the same dotted accessor. The builder flags the collision; pick one spelling.

Mistake:Referencing a version that does not exist in [versions].

Fix:Declare the version first or use an inline @version value. The validator lists every unresolved reference.

Mistake:Assuming the catalog file can live anywhere.

Fix:Gradle looks for gradle/libs.versions.toml by default (or the file configured in settings.gradle); download puts the right filename in your hands.

Frequently asked questions

How do catalog alias names map to accessors?

Every separator (-, . or _) becomes a dot in the generated accessor: androidx-core-ktx becomes libs.androidx.core.ktx, and a bundle named compose becomes libs.bundles.compose. Aliases must be lowercase and may not contain consecutive separators, which is why foo--bar is rejected. Two aliases that normalize to the same accessor — foo-bar and foo.bar — are flagged as a collision before you commit the catalog.

Why is camelCase invalid in a version or alias name?

Gradle's catalog specification restricts names to lowercase letters, digits and the -_. separators between words. Uppercase characters and Kotlin-style camelCase cannot be converted into a predictable dotted accessor, so Gradle rejects the catalog at configuration time. The builder validates the grammar as you type and shows the exact offending row.

What are bundles for?

A bundle groups several library aliases under one name so a module can add them with a single call: implementation(libs.bundles.compose). Members must be declared libraries — the validator reports unknown members. Bundles do not change version resolution; they only shorten build scripts and keep related dependencies together.

Where does the catalog file live and how is it enabled?

By default Gradle looks for gradle/libs.versions.toml and makes its aliases available automatically in recent Gradle versions. In older versions you enable it in settings.gradle(.kts) with dependencyResolutionManagement { versionCatalogs { create("libs") { from(files("gradle/libs.versions.toml")) } } }. Download from this tool saves the file with the exact name libs.versions.toml.

Can I use a catalog in settings.gradle?

Yes. The most common use is declaring plugins in the root build file with alias(libs.plugins.kotlin.android) apply false, then applying them in subprojects. Catalogs are configured in settings, and the generated plugin snippets include the apply false form so you can paste them straight into settings.gradle.kts or the root build script as appropriate.

Does the tool check if dependency versions exist?

No. Version values are typed by you and never looked up in a registry, so nothing is uploaded and generation is instant. Use your build's dependency verification or IDE inspection to confirm a coordinate resolves.

References & standards