redhat-developer / redhat-developer/vscode-java

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

Abierto
#1,486 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Gradle
Lenguaje dominante
TypeScript
Estrellas
2.3k
Forks
546
Merge medio
20 h 1 min
PR fusionados (30 d)
11

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza rastreando cómo se gestiona la configuración java.import.gradle.home al generar .settings/org.eclipse.buildship.core.prefs para subproyectos de Gradle. Reproduce la configuración multiproyecto con ${workspaceFolder} e inspecciona la ruta de preferencias generada. Se considera terminado cuando la variable se expande y los subproyectos hacen referencia a la ruta del wrapper del proyecto raíz.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java, typescript
Área
build-system
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.