我是一个新手,我看到了这一段:
The Gradle Wrapper is the preferred way of starting a Gradle build. It consists of a batch script for Windows support and a shell script for support on OS X and Linux. These scripts allow you to run a Gradle build without requiring that Gradle be installed on your system. You can install the wrapper into your project by adding the following lines to the build.gradle
但我在build.gradle
中启用了仅在安装gradle后使用的gradle warpper。没有?
如何在不安装gradle的情况下运行一次?我在添加
时运行它 task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
到build.gradle文件。否?
答案 0 :(得分:0)
一旦gradle wrapper
运行一次(确实需要另一个Gradle安装)或者包装文件已经从另一个版本复制,并且包装文件已经提交给源代码控制,所有用户都可以(并且应该)通过生成的gradlew(.bat)
脚本执行构建,该脚本将在第一次调用时自动下载Gradle。这将确保:
gradle/wrapper/gradle-wrapper.properties
)