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

Abierto
#661 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@vibgrate-team ya está trabajando en esto.

Desde el 13/11/2026.

  • #682 de @vibgrate-team — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
kotlin, typescript
Área
backend, cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
4
Forks
3
Merge medio
1 d 22 h
PR fusionados (30 d)
76

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de vibgrate/cli

Todos los issues de vibgrate/cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.