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

オープン
#661 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@vibgrate-team がすでに取り組んでいます。

2026年11月13日 から。

  • #682 @vibgrate-team による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
kotlin, typescript
領域
backend, cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。