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

gradle version inconsistence #797

Closed
wxlfrank opened this issue Nov 25, 2020 · 6 comments
Closed

gradle version inconsistence #797

wxlfrank opened this issue Nov 25, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@wxlfrank
Copy link

Extension Name: vscode-gradle
Extension Version: v3.5.2
OS Version: macOS Big Sur Version 11.0.1
VSCode version: 1.51.1

Describe the bug
I installed gradle 6.7 and use gradle init to create a gradle project
but in vscode, the .gradle folder contains both 6.3 and 6.7 subfolders.

If I run the gradle init command in terminal, there is only one subfoler, 6.7, in the .gradle folder

I also found in the buildOutputCleanup folder, the cache.properties file has gradle.version=6.3
where does this gradle.version property come from?

To Reproduce

  • mkdir test && cd test
  • gradle init
  • code .

Expected behavior
gradle project should has no problem in vscode

@wxlfrank wxlfrank added the bug Something isn't working label Nov 25, 2020
@wxlfrank
Copy link
Author

wxlfrank commented Nov 25, 2020

the current gradle task setting is

// Arguments to pass to Gradle.
"java.import.gradle.arguments": null,

// Enable/disable the Gradle importer.
"java.import.gradle.enabled": true,

// Use Gradle from the specified local installation directory or GRADLE_HOME if the Gradle wrapper is missing or disabled and no 'java.import.gradle.version' is specified.
"java.import.gradle.home": null,

// The location to the JVM used to run the Gradle daemon.
"java.import.gradle.java.home": null,

// JVM arguments to pass to Gradle.
"java.import.gradle.jvmArguments": null,

// Enable/disable the Gradle offline mode.
"java.import.gradle.offline.enabled": false,

// Setting for GRADLE_USER_HOME.
"java.import.gradle.user.home": null,

// Use Gradle from the specific version if the Gradle wrapper is missing or disabled.
"java.import.gradle.version": null,

// Use Gradle from the 'gradle-wrapper.properties' file.
"java.import.gradle.wrapper.enabled": true,

// Enable/disable the Maven importer.
"java.import.maven.enabled": true,

// Defines allowed/disallowed SHA-256 checksums of Gradle Wrappers
"java.imports.gradle.wrapper.checksums": [],

@badsyntax
Copy link
Collaborator

badsyntax commented Nov 25, 2020

Unfortunately I cannot reproduce. I can init a new project using gradle 6.7.1 and that's the version used in vscode.

Can you paste the contents of gradle/wrapper/gradle-wrapper.properties?

Can you also paste the output from the Gradle Tasks extension? (You can find these logs in the Output panel).

@wxlfrank
Copy link
Author

as your request.

gradle/wrapper/gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

Gradle Tasks output

[info] [gradle-server] Server started, listening on 59777
[info] Gradle client connected to server
[info] Java Home: /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
[info] JVM Args: --add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=NO,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /Users/wxlfrank/.gradle
[info] Gradle Version: 6.7
[info] CONFIGURE SUCCESSFUL in 143ms
[info] Found 46 tasks

@wxlfrank
Copy link
Author

Another action should be done to reproduce the problem.

open the main java file, the .gradle folder will be updated

@badsyntax
Copy link
Collaborator

Hmm, i wonder if it's the Java extension doing this. Possibly related issue: redhat-developer/vscode-java#924

Can you try disable the Java extension and test this again?

@wxlfrank
Copy link
Author

Yes. You are right. Thank you for the help

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