redhat-developer / redhat-developer/vscode-java
Setting java.import.gradle.home in multi-project structure via vscode variable
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.3k
- Forks
- 546
- Ø Merge
- 20 Std. 1 Min.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit nachzuverfolgen, wie die Einstellung java.import.gradle.home beim Generieren von .settings/org.eclipse.buildship.core.prefs für Gradle-Teilprojekte behandelt wird. Reproduziere das Multi-Projekt-Setup mit ${workspaceFolder} und prüfe den generierten Einstellungspfad. Als abgeschlossen gilt die Aufgabe, wenn die Variable erweitert wird und die Teilprojekte auf den Wrapper-Pfad des Root-Projekts verweisen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, typescript
- Bereich
- build-system
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100