VERSION CHECKS / SOURCE EDITS

Dependencies.
BOMs. Plugins.
Gradle wrapper.

Check dependencies, BOMs, constraints, plugins and the wrapper for newer versions. Select updates in the terminal and write them back to your source files.

JAVA 21+ / GRADLE 8.8+ / APACHE-2.0

EXAMPLE / UPDATE CHECK
deplens / checkEXAMPLE

$ ./gradlew depLensCheck

Checking versions with dependencies and constraints

DEPENDENCIES
org.example:library1.4.2 → 1.5.0

2.0.0 available · outside the minor policy

PLATFORMS / BOMs
org.example:stack-bom3.1.0 → 3.2.0

Managed dependencies follow their BOM

GRADLE PLUGINS
org.example.tool2.0.0 → 2.1.0
3 recommended updates / sources unchanged

$ ./gradlew depLensInteractiveUpdate

01 — DISCOVER02 — CHOOSE03 — APPLY
SUPPORTED GRADLE FEATURESGroovy + Kotlin DSLVersion catalogsComposite buildsConfiguration CacheIsolated Projects

01 / VERSION SELECTION

Select versions.
Inspect the diff.

Choose catalog versions below.
See the resulting TOML changes.
Illustrative demo. No files are written.

libs.versions.tomlINTERACTIVE DEMO
0 sources selected
Example version sources and policy-allowed updates
Version source / consumers Policy Target version
libraryorg.example:library 2 consumers minor
stackorg.example:stack-bom BOM major
toolorg.example.tool minor
legacyorg.example:legacy pinned 1.0.0 — protected

All rows start at Current. Select a version to see its change in the diff.

Recommended passed the example build checks. Latest allowed follows update rules and may need changes to build restrictions.

02 / HOW CHECKS AND EDITS WORK

Check candidates.
Then edit versions.

Full checks resolve candidate versions with the other dependencies and rules of each consuming build.

Resolution checks
[01]

Check dependencies together.

Gradle resolves candidates with other dependencies, BOMs, constraints and Java/variant requirements. A newer version can be available without being accepted by the current build.

[02]

Choose shared versions once.

A catalog key, property or variable gets one choice for all checked components using it. A pinned, failed or unchecked component prevents editing that shared value.

[03]

Replace version literals.

DepLens preserves comments and formatting and checks for concurrent edits before writing. A wrapper update also replaces its existing distribution checksum.

03 / INSTALLATION

Install DepLens.
Version 0.1.0.

Java 21+. Gradle 8.8+.
macOS or Linux for interactive updates.

1 / SETTINGS PLUGIN
settings.gradle.kts
plugins {
    id("com.sneedit.deplens.settings") version "0.1.0"
}
2 / RUN THE TASKS
terminal
# Check all component types without editing files.
./gradlew depLensCheck

# Select versions in the terminal and apply changes.
./gradlew depLensInteractiveUpdate

# Show source locations and resolution diagnostics.
./gradlew depLensCheck --info
↑ ↓ navigate   ← → choose   Enter apply   Esc cancelView example builds

04 / UPDATE RULES

Configure
update rules.

This example allows minor dependency updates, limits the org.example group to patches and keeps org.example:legacy at its current version.

It also makes check tasks fail if inventory or update checks are incomplete. The JSON report is written before the task fails.

Rule scopes and precedence
build.gradle
build.gradle.kts
depLens {
    dependencies { allowedUpdates.set("minor") }
    rules {
        group("org.example") {
            allowedUpdates.set("patch")
        }
        dependency("org.example:legacy") {
            pinned.set(true)
        }
    }
    failIfChecksIncomplete.set(true)
}

05 / CONFIGURATION REFERENCE

Configuration
and defaults.

Find each option’s default, supported scope and behavior, with Kotlin and Groovy configuration examples.

SOURCE, EXAMPLES AND ISSUES

Plugin source
on GitHub.

View the repository