简体   繁体   English

运行 ./gradlew 和 ./gradlew build 有什么区别?

[英]What is the difference between running ./gradlew and ./gradlew build?

What is the difference between running ./gradlew and ./gradlew build ?运行./gradlew./gradlew build有什么区别?

Both seem to be build the project, but ./gradlew ignore test and compileTest task.两者似乎都在构建项目,但是./gradlew忽略了testcompileTest任务。 When test has problem, ./gradlew build is failed, but ./gradlew is succeeded.当测试有问题时,. ./gradlew build失败,但./gradlew成功。

./gradlew is invoking the Gradle Wrapper with no task specified. ./gradlew正在调用Gradle 包装器,但未指定任务。 By default, this displays Gradle version information.默认情况下,这会显示 Gradle 版本信息。 This behavior can be changed by settings a default task可以通过设置默认任务来更改此行为

./gradlew build invokes the Gradle Wrapper with the task named build . ./gradlew build使用名为build的任务调用 Gradle Wrapper。 Therefore, the build task executes along with any of its task dependencies .因此, build任务连同其任何任务依赖项一起执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM