Updating a Gradle dependency
Rules: see .claude/rules/dependencies.md.
Procedure
- Decide the shape of the change.
- New library — add to
[versions],[libraries], then reference vialibs.<alias>inapp/build.gradle.kts. - Version bump — edit the
[versions]entry only. - New plugin — add to
[versions],[plugins], then apply viaalias(libs.plugins.<alias>)in the relevantbuild.gradle.kts.
- Edit
gradle/libs.versions.tomlin this order:
[versions]: alphabetical by key, lowercase camelCase.[libraries]: hyphenated keys (androidx-core-ktx).[plugins]: hyphenated keys, version refs.
- Reference from
app/build.gradle.ktsusing the alias:
```kotlin
implementation(libs.androidx.compose.material3)
```
Hyphens in the catalog key become dots on the alias side.
- Sanity-check what resolved:
```bash
./gradlew app:dependencies --configuration debugRuntimeClasspath \
| grep -iE 'kotlin-stdlib|<your-artifact>' | head
```