How to set Gradle wrapper version when create new project for IntelliJ IDEA?

旧城冷巷雨未停 提交于 2021-02-16 14:51:29

问题


When I create new Gradle project with IntelliJ IDEA, the Gradle wrapper version is always 4.10.2, but I have updated my Gradle to 5.2.1.

This is the file gradle/wrapper/gradle-wrapper.properties.

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

I tried update Gradle wrapper version with:

./gradlew wrapper --gradle-version 5.2.1

It works.

But, I want to set the Gradle wrapper version when I create new project, not after it.

How?


回答1:


Currently IDEA uses the version of gradle that comes bundled with the IDE's gradle plugin.

Your request has been filed in IntelliJ's issue tracker before. You can see and vote for it here: https://youtrack.jetbrains.com/issue/IDEA-177325



来源:https://stackoverflow.com/questions/54708327/how-to-set-gradle-wrapper-version-when-create-new-project-for-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!