redhat-developer / redhat-developer/vscode-java

If wrapper is disabled, Gradle import should prefer the one on the Path over the embedded one

Open
#2,372 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Gradle preferences
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

With "java.import.gradle.wrapper.enabled": false, the import prefers the embedded Gradle over the Gradle on the Path. This is counterintuitive and leads to errors: currently the embedded Gradle is 7.1.1, which is unable to import JDK 17 projects.
I know that I can set java.import.gradle.home, but that is merely a workaround.

Environment
  • Operating System: Windows 11
  • JDK version: 17.0.2
  • Visual Studio Code version: 1.65.2
  • Java extension version: 1.4.0
Steps To Reproduce
  1. have Gradle 7.3.1+ on the Path
  2. set "java.import.gradle.wrapper.enabled": false
  3. import a JDK 17-based Gradle project
Current Result

Fails with an error related to the embedded Gradle

Expected Result

Succeeds because the Gradle on the Path is preferred over the embedded Gradle

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Gradle import with java.import.gradle.wrapper.enabled set to false, Gradle 7.3.1 or newer on PATH, and a JDK 17-based project. Trace the Gradle selection entry point and verify that the PATH installation is selected instead of the embedded Gradle, then confirm the project imports successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.