redhat-developer / redhat-developer/vscode-java

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

オープン
#1,486 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Gradle
主要言語
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
  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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。