Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[error] [gradle-server] Gradle version is required #922

Closed
Eskibear opened this issue Aug 19, 2021 · 5 comments
Closed

[error] [gradle-server] Gradle version is required #922

Eskibear opened this issue Aug 19, 2021 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@Eskibear
Copy link
Member

Extension Name: vscode-gradle
Extension Version: Private build based on PR #919
OS Version: Windows 10
VSCode version: 1.59.0

Describe the bug
Nothing is working, except a message "Gradle: Build Error" on status bar.

To Reproduce

  1. use spring initializr to create a simple gradle project.
  2. open it, and you see the screenshot

Expected behavior

  1. I expect it's working out-of-box, but I don't see much insightful message from the log after I click the status bar item.
  2. the "Gradle: Build Error" is not obvious, so I spend time wondering what's happening. Maybe a warning/error color is better?
  3. the "Gradle: Build Error" stays there forever. How do I get it resolved?

Screenshots
image

Output from "Gradle Tasks"

[info] [gradle-server] Server started, listening on 59365
[info] Gradle client connected to server
[error] [gradle-server] Gradle version is required
[error] Error getting build for c:\Users\admin\projects\demo-gradle: Gradle version is required
[info] Found 0 tasks

@Eskibear Eskibear added the bug Something isn't working label Aug 19, 2021
@Eskibear
Copy link
Member Author

FYI, my settings:
image

@CsCherrYY CsCherrYY added this to the 3.7.0 milestone Aug 19, 2021
@Eskibear
Copy link
Member Author

Eskibear commented Aug 19, 2021

after changing to use gradle wrapper, tasks are correctly listed, but dependencies are still not there, and the status bar error message is the same.

logs from output:
log.txt

image

@CsCherrYY
Copy link
Collaborator

CsCherrYY commented Aug 19, 2021

after changing to use gradle wrapper, tasks are correctly listed, but dependencies are still not there, and the status bar error message is the same.

logs from output:
log.txt

image

This comes from circular dependencies and has been fixed in #923. For the Gradle local problem, I'll continue to investigate and fix

related issue: #819

@CsCherrYY
Copy link
Collaborator

Here are some findings about this issue:

related discusstion: #243 (comment)

In vscode-java, there are a lot of Gradle related settings, they are:

In a short word, java.import.gradle.user.home is used to cache resources, and the other three settings are used to specific gradle distribution (wrapper, specific version or local distribution). In the reference: https://github.com/redhat-developer/vscode-java/blob/master/README.md#supported-vs-code-settings, the priority of the three settings is java.import.gradle.wrapper.enabled, java.import.gradle.version, java.import.gradle.home. If a more front setting is valid (has been set and with a valid value), the rest settings will be ignored.

Currently, vscode-gradle consumes the first two settings, java.import.gradle.wrapper.enabled, and java.import.gradle.version, with the correct priority. It doesn't support java.import.gradle.home currently, that the root cause of this issue.

So I plan to support java.import.gradle.home with a lowest priority among these three settings to support the local distribution scenario. Could you please provide any comments? Or is there any misunderstanding from me in the content? @Eskibear @testforstephen @jdneo

@CsCherrYY
Copy link
Collaborator

fixed in #926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants