在Grails项目中更新Gradle [英] Update Gradle in Grails project
问题描述
我正在使用Grails 3.0.5
I am using Grails 3.0.5
创建项目后...在根项目中,文件夹.gradle的版本为2.3 ...
After I create a project... at root project has folder .gradle with 2.3 version...
如何更新该Gradle版本?
How to update that Gradle version?
我试图下载Grails 3.0.9并创建一个新项目..但它仍使用Gradle 2.3版本..
I tried to download Grails 3.0.9 and create a new project..but it still use Gradle 2.3 version..
我尝试从此链接下载Gradle 2.6,因为我使用的是Windows ...我尝试运行gradlew.bat ...并使用Grails 3.0.9版本重新创建应用程序...我仍然使用Gradle 2.3获得新项目
I tried to download Gradle 2.6 from this link , because I am using windows... I tried to run gradlew.bat ... and recreate-app with Grails 3.0.9 version...and i still get a new project with Gradle 2.3
推荐答案
在 gradle.properties
中定义.如果您在那里更改版本(我建议使用2.8的新功能和提高速度),则可以使用Gradle 2.3中的包装器为要更新到的任何版本生成新的包装器.刚运行
That's defined in gradle.properties
. If you change the version there (I recommend using 2.8 for the new features and speed improvements) you can use the wrapper that's there from Gradle 2.3 to generate a new wrapper for whatever version you're updating to; just run
gradlew.bat wrapper
或
./gradlew wrapper
(如果您使用的是Linux或OSX),它将更新 gradlew
和 gradlew.bat
脚本以及 gradle/wrapper 下的包装器文件代码>.
if you were using Linux or OSX, and it will update the gradlew
and gradlew.bat
scripts, and the wrapper files under gradle/wrapper
.
这篇关于在Grails项目中更新Gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!