redhat-developer / redhat-developer/vscode-java
Setting java.import.gradle.home in multi-project structure via vscode variable
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
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
- Create gradle multi-project
- Set
java.import.gradle.homeusing${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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Gradle サブプロジェクト向けに .settings/org.eclipse.buildship.core.prefs を生成する際、java.import.gradle.home 設定がどのように処理されるかを追跡します。${workspaceFolder} を使ったマルチプロジェクト構成を再現し、生成された設定パスを確認します。変数が展開され、サブプロジェクトがルートプロジェクトの wrapper パスを参照すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- build-system
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100