redhat-developer / redhat-developer/vscode-java
Dependency with scope test in gradle falls into the main classpath
未关闭
还没有人认领这个 Issue。
Gradle
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
[provide a description of the issue]
Environment
- Operating System: MacOs
- JDK version: 17
- Visual Studio Code version: 1.93.1
- Java extension version: v1.34.0
Steps To Reproduce
The gradle project. If there is a dependency on another module in a multi-module project with scope test, then this dependency falls into the main classpath.
Current Result
In build.gradle.kts
testImplementation(project(":backend:core:model"))
testImplementation(project(":backend:core:ports"))
In .classpath of this module
<classpathentry kind="src" path="/ports">
<attributes>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="/model">
<attributes>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
Expected Result
In .classpath of this module
<classpathentry kind="src" path="/ports">
<attributes>
<attribute name="test" value="true"/>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="/model">
<attributes>
<attribute name="test" value="true"/>
<attribute name="gradle.buildServer" value="true"/>
</attributes>
</classpathentry>
Additional Informations
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从多模块 Gradle 项目开始,同时检查 build.gradle.kts 和生成的 .classpath 条目。复现 testImplementation 依赖项的行为,然后验证受影响的源条目是否获得 test=true 属性,同时保留 gradle.buildServer=true。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- build-system
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100