Enhancement: scan Gradle `plugins { id "…" version "…" }` declarations

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

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

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, typescript

調査の方向性

Start with parseGradleBuild in src/core-open/scanners/java-scanner.ts and the Gradle fixtures under test/fixtures/gradle-android-app; check the existing dependency row shape and tests. Add coverage for Groovy and Kotlin DSL plugin pins, apply false, settings plugin management, and unversioned plugins, then update the Gradle mapping table in DOCS.md. Done means plugin pins appear as development/build rows with marker coordinates and declared versions, unversioned plugins gain no invented coordinate, and ordinary implementation rows remain unchanged; buildscript.classpath may be left out of scope.

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

説明

enhancement help wanted
  • Difficulty: medium
  • Area: Java / Gradle
Problem

parseGradleBuild in src/core-open/scanners/java-scanner.ts (around lines 546–618) reads dependencies { }, platform(), version-catalog aliases, and toolchain / compatibility versions. It does not read the plugins { } block, buildscript { dependencies { classpath … } }, or settings.gradle / settings.gradle.kts pluginManagement { plugins { } }.

These declarations are real build dependencies and are often the only pin for the Android / Kotlin / Spring plugin:

// build.gradle.kts
plugins {
    id("org.jetbrains.kotlin.jvm") version "1.9.24"
    id("com.android.application") version "8.5.2" apply false
}
plugins {
    id 'org.springframework.boot' version '3.3.0'
}

A scan of test/fixtures/gradle-android-app/app/build.gradle.kts would already show id("com.android.application") with no version on the app project (the version often lives in the root plugins or pluginManagement block). Those pins never become Maven coordinates today.

Expected behaviour

Read plugins { id("…") version "…" } / id '…' version '…' from build.gradle and build.gradle.kts, and from settings.gradle / settings.gradle.kts pluginManagement { plugins { } } when that file is in the project or scan root. Map a plugin id to the plugin-portal marker artifact id:id.gradle.plugin (for example org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin). Record them as development / build rows (they are not production application dependencies), with the declared version as currentSpec. apply false still records the pin. Plugins with no version (applied from a parent or a version catalog alias) should reuse the existing version-catalog work when the alias is already resolvable; otherwise leave them unversioned and out of mavenCoordinateReady-style rows rather than inventing a version. buildscript.classpath can be a follow-up; mention it as out of scope if you skip it.

Acceptance
  • Tests include Groovy and Kotlin DSL, apply false, a settings.gradle pluginManagement pin, and a plugin id with no version (no invented coordinate).
  • id("org.jetbrains.kotlin.jvm") version "1.9.24" appears as org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin at 1.9.24, in a non-production section.
  • Ordinary implementation 'g:a:v' rows are unchanged.
  • DOCS.md gets a short row in the Gradle mapping table.

主要言語
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 を短くまとめたダイジェスト。