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

Đang mở
#725 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, typescript
Lĩnh vực
build-system, devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
4
Fork
3
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
76

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vibgrate/cli

Tất cả issue của vibgrate/cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.