redhat-developer / redhat-developer/vscode-java

Dependency with scope test in gradle falls into the main classpath

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

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

Gradle
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

[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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu với dự án Gradle đa mô-đun và kiểm tra build.gradle.kts cùng với các mục .classpath được tạo. Tái hiện hành vi của dependency testImplementation, sau đó xác minh rằng các mục source bị ảnh hưởng nhận thuộc tính test=true trong khi vẫn giữ gradle.buildServer=true.

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

Đánh giá

Công nghệ
java
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.