问题
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