microsoft / vscode-gradle

Manage Gradle Projects, run Gradle tasks and provide better Gradle file authoring experience in VS Code
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle
MIT License
124 stars 51 forks source link

创建java项目不要下载gradle #1471

Closed ncnnnnn closed 6 months ago

ncnnnnn commented 8 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

  "java.import.gradle.home": "。。",
  "java.import.gradle.version": "8.0.2",
  "java.import.gradle.java.home": "。。",
  "java.import.gradle.wrapper.enabled": false

这些设置一点用都没有。 每次还是

··· Downloading from https://services.gradle.org/distributions/gradle-8.0.2-bin.zip ···

还不如直接终端里面 gradle.bat init还省事多了,,,

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

SaikaAn commented 6 months ago

我是阅读了 com.github.badsyntax.gradle.GradleProjectConnector#setConnectorConfig 这个函数里面的逻辑解决的: 仅仅只配置下面两个 "java.import.gradle.home": "{your path}", "java.import.gradle.wrapper.enabled": false, 其他的配置项都删除掉了 务必保证 "java.import.gradle.version"的值为空 ,不要去配置它

ncnnnnn commented 6 months ago

谢谢。非常有效。