Bug: Gradle map-style dependencies (`implementation group: 'g', name: 'a', version: 'v'`) are dropped

Aperta
#661 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vibgrate-team ci sta già lavorando.

Dal 13/11/2026.

  • #682 di @vibgrate-team — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
kotlin, typescript
Ambito
backend, cli

Direzione di ricerca

Start in src/core-open/scanners/java-scanner.ts at parseGradleBuild (around lines 444–459) and read the existing Gradle string notation parsing and pushGradleCoord flow. Add coverage for Groovy and Kotlin map notation, including entries without a version, and check that configuration names, section rules, and de-duplication are preserved. Done means the examples produce the expected coordinates, testImplementation lands in devDependencies, and missing versions behave like string entries.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Context

The Gradle regexes in parseGradleBuild (src/core-open/scanners/java-scanner.ts, around lines 444–459) only read string notation, implementation 'group:artifact:version' and implementation("group:artifact:version").

Groovy builds, especially older ones, often use the map form instead:

implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'
testImplementation(group: "junit", name: "junit", version: "4.13.2")

Kotlin DSL has the same shape: implementation(group = "org.apache.commons", name = "commons-lang3", version = "3.14.0").

None of these produce a row today, so the dependency is missing from vg scan and vg sbom export.

What to do

  1. Add a parser for the map form in both Groovy (key: 'value') and Kotlin (key = "value") syntax, with or without parentheses, in any key order.
  2. Feed the result through pushGradleCoord with the right configuration name so section rules and de-duplication still apply.
  3. Add tests for Groovy and Kotlin map notation, including one without a version key.

Acceptance

  • The Groovy and Kotlin examples above each produce one row with the right coordinate and version
  • testImplementation group: ... lands in devDependencies
  • A map entry without version behaves like a string entry without a version
Lingua principale
TypeScript
Stelle
4
Fork
3
Merge medio
1g 22h
PR unite (30g)
76

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vibgrate/cli

Tutte le issue di vibgrate/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.