bump-versions
Bump dependency versions in Gradle version catalogs, Amper catalogs, and Maven POMs using caupain or the Maven Versions Plugin.
Bump Versions
Update project dependency versions to their latest stable releases using the right tool for each build system.
Detect the Build System
Before updating anything, identify which build system the project uses:
gradle/libs.versions.toml→ Gradle version catalog (docs)libs.versions.tomlat the project root alongsidemodule.yaml→ Amper version catalog (docs)pom.xml→ Maven project (docs)
If multiple build systems coexist, update each one independently.
Gradle Version Catalog
Use caupain to discover available updates, then apply them to the catalog. On macOS, install via brew install deezer/repo/caupain.
- Run
caupain --no-cachein the project root. - Update only version values in the
[versions]section ofgradle/libs.versions.toml. - Preserve exact formatting — quotes, spacing, alignment, line order.
- Never modify
.gradle.ktsor.gradlebuild files. - Never run Gradle builds for validation.
# Before
kotlin = "2.3.20"
# After
kotlin = "2.3.21"
Amper Version Catalog
Use caupain with the root-level catalog, then update both the catalog and module.yaml.
- Run
caupain --no-cache -i libs.versions.tomlin the project root. - Update version values in
libs.versions.toml(at the project root, not undergradle/). - Update
module.yamlif it has inline versions (e.g., Kotlin, JUnit, JVM release). - Preserve exact formatting — quotes, spacing, alignment, line order.
- Never modify Amper build config beyond version bumps.
# Before
kotlinx-io = "0.8.2"
# After
kotlinx-io = "0.9.0"
Maven POM
Use the Maven Versions Plugin to discover available updates, then apply them to pom.xml.
- Run
./mvnw clean versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updatesin the project root. - Update only
<properties>values inpom.xmlwith the reported latest versions. - Preserve exact formatting — indentation, tag style, line order.
- Never run any other Maven commands for validation.
<!-- Before -->
<kotlin.version>2.3.20</kotlin.version>
<!-- After -->
<kotlin.version>2.3.21</kotlin.version>
Rules
- Always use the appropriate tool (
caupainormvnw versions:) to discover latest versions — never manually check Maven Central or GitHub. These tools handle transitive compatibility and release metadata far more reliably than manual lookups. - Only change version values. Never alter keys, property names, dependency coordinates, or structural formatting.
- Prefer stable releases over pre-release/beta unless the project already uses a pre-release version for that dependency.
- Make no other changes to the codebase beyond version bumps.