问题描述
当我使用IntelliJ IDEA创建新的Gradle项目时,Gradle包装器版本始终为4.10.2,但我已将Gradle更新为5.2.1.
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.
这是文件 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
我尝试使用以下方式更新Gradle包装器版本:
I tried update Gradle wrapper version with:
./gradlew wrapper --gradle-version 5.2.1
有效.
但是,我想在创建新项目时设置Gradle包装器版本,而不是在其后.
But, I want to set the Gradle wrapper version when I create new project, not after it.
如何?
推荐答案
当前,IDEA使用与IDE的gradle插件捆绑在一起的gradle版本.
Currently IDEA uses the version of gradle that comes bundled with the IDE's gradle plugin.
您的请求之前已在IntelliJ的问题跟踪器中提交.您可以在此处查看并投票: https://youtrack.jetbrains.com/issue/IDEA-177325
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
这篇关于为IntelliJ IDEA创建新项目时如何设置Gradle包装器版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!