Skip to content

feat(java): resolve Gradle version-catalog aliases - #612

Open
vibgrate-team wants to merge 1 commit into
mainfrom
cursor/gradle-version-catalog-e95b
Open

vibgrate-team wants to merge 1 commit into
mainfrom
cursor/gradle-version-catalog-e95b

Conversation

@vibgrate-team

Copy link
Copy Markdown
Contributor

Summary

vg scan now resolves Gradle libs version-catalog aliases to Maven coordinates.

  • Reads the conventional gradle/libs.versions.toml ([versions], [libraries], and [bundles]), including a catalog next to the nearest settings.gradle / settings.gradle.kts above the build file.
  • When that settings file declares the libs catalog with from(files("…")), those paths are used instead.
  • implementation(libs.jackson.databind) and implementation libs.jackson.databind become group:artifact rows. version.ref is followed. libs.bundles.* expands to the member libraries.
  • A gradle.lockfile pin still supplies resolvedVersion when both exist. currentSpec stays the catalog version. Projects with no catalog file are unchanged.

Related issues

Closes #606

Checklist

  • pnpm test passes
  • pnpm lint is clean
  • pnpm typecheck is clean
  • Docs updated (README / DOCS / ARCHITECTURE) where behavior changed
  • Determinism preserved — identical input still produces identical graph.json / report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)
  • No proprietary or internal references — public, Apache-2.0 content only
  • Commits use Conventional Commits and are signed off (git commit -s, DCO)

Notes for reviewers

Catalog alias separators -, _, and . match the dotted accessor (jackson-databind → libs.jackson.databind). [plugins] is not treated as a dependency. A library with no resolved version still does not create a row, and a lockfile line alone still does not invent one.

Open in Web Open in Cursor 

Gradle scan rows for libs.* aliases now come from
gradle/libs.versions.toml, including version.ref and bundles.
A gradle.lockfile pin still supplies resolvedVersion when both exist.

Closes #606

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: resolve Gradle version-catalog aliases from libs.versions.toml in vg scan

2 participants