Repository navigation
fix(gradle): run and debug the current Java file with its Gradle source set - #16
Merged
Merged
Conversation
1lck
marked this pull request as ready for review
November 21, 2026 03:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
在 JUnit 5 的 Gradle 工程打开
ConsoleLauncher.java后,从当前文件运行或调试会被 JDT 编译错误阻断。项目的 Gradle Wrapper 可以成功编译同一模块。改动 / Changes
不在本 PR 范围内 / Out of scope
JUnit 源集的常规运行类路径缺少重定位前的 picocli。用 JUnit 项目自带的
:documentation:consoleLauncher --args=--version可正常输出版本;源码直接启动的异常也在 IDEA 复现。项目级JavaExec任务已可从构建工具窗口运行。标题栏列出任务型配置、Java 行号栏编译路径和 Ant 导入是独立路径;Ant 见 1lck/Lithe-IDEA#1761。类型专属:fix
复现与根因
8a21048打开ConsoleLauncher.java,设置第 34 行断点,选择标题栏「当前文件」并 Debug。旧路径的 JDT 在启动前报告编译错误,预期使用 Gradle 构建并命中断点。检查项
scripts/test.mjs回归。旧包失败于Gradle must handle current-file Run and Debug through its build provider,新包通过。.agents/notes/implemented/bug-fix/2026-11-20-gradle-current-file-java-runtime.md。范围检查 / Scope checks
功能矩阵 / Feature matrix
docs/feature-matrix.md,分别注明实现状态和目标平台证据。插件归属 / Plugin ownership
UI 验证 / UI evidence
N/A。本次接入既有的标题栏运行配置、运行面板和调试面板。实际操作结果见验证表。
统一日志系统 / Structured logging
界面文案 / i18n
逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A。复用标题栏运行配置编辑器,未增加设置项。
插件契约 / Plugin contract
N/A。使用已合入的 Core 构建提供者及调试注册表契约,SDK 固定到
7c1cd55。没有新增宿主方法、通知或契约字段。发行包与资源 / Bundle and resources
无用代码与重构 / Dead code and refactoring
N/A。本次没有替换旧设置、构建树或其他运行配置路径。
验证 / Verification
node scripts/test.mjs500158fSpringApplication.java8a21048CommandFacade.java,源码启动进入 JVM 后因项目类路径缺少 picocli 退出./gradlew --no-daemon --no-build-cache :documentation:consoleLauncher --args=--versionWindows 11 ARM64 来宾使用 x64 JDK 17,通过已打包插件验证 Petclinic 主类发现、Wrapper 构建和首页 HTTP 200,并核对插件包字节不变。Windows 完整工作台的项目导入、断点与跳转未覆盖。
首轮截图检查固定的宿主不支持
buildProviders1。已将宿主更新到c2eb7a7,并同步截图测试的设置语言参数。相同宿主的本地无头截图复测通过。提交前确认 / Final checks
main的d46e4d2创建分支,目标为main。