redhat-developer / redhat-developer/vscode-java

Setting java.import.gradle.home in multi-project structure via vscode variable

Đang mở
#1,486 3 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
547
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

I have a gradle multi-project structure in which the gradle wrapper is only placed in the root project.
Since I want all sub-projects to use the same wrapper (and not e.g. my local installation) I set the java.import.gradle.home in my workspace settings.
Ideally, I want to set this variable as: java.import.gradle.home=${workspaceFolder}/.gradle/...
However, in the generated .settings/org.eclipse.buildship.core.prefs in the subprojects I can see that the path is only copied and the vscode variable ${workspaceFolder} is not expanded.

Is it possible to support vscode variable expansion in the extension?
Are there other ways to set the gradle wrapper path relative to the project path? Currently, I am using the absolute path in my settings file. However, this would need to be updated by other team members.

Environment
  • Operating System: macOS
  • JDK version: 1.11
  • Visual Studio Code version:1.45.1
  • Java extension version: 0.62.0
Steps To Reproduce
  1. Create gradle multi-project
  2. Set java.import.gradle.home using ${workspaceFolder}
Current Result

Vscode variables (e.g. ${workspaceFolder}) used for e.g. java.import.gradle.home are not expanded in the org.eclipse.buildship.core.prefs (hence throwing no such file exception)

Expected Result

Vscode variables are correctly expanded and correct path is shown in org.eclipse.buildship.core.prefs of the subprojects

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 bằng cách truy vết cách thiết lập java.import.gradle.home được xử lý khi tạo .settings/org.eclipse.buildship.core.prefs cho các subproject Gradle. Tái hiện cấu hình multi-project với ${workspaceFolder} và kiểm tra đường dẫn tùy chọn được tạo. Hoàn tất khi biến được mở rộng và các subproject tham chiếu đến đường dẫn wrapper của project gốc.

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, typescript
Lĩnh vực
build-system
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 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.