使用gradlew和gradle的区别

使用gradlew和gradle的区别

本文介绍了使用gradlew和gradle的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 gradlew gradle 或它们是否相同?

解决方案

不同之处在于 ./ gradlew 表示您正在使用gradle包装器。包装通常是项目的一部分,它有助于安装Gradle。如果您在没有包装的情况下使用gradle,则必须手动安装它 - 例如,在mac brew install gradle 中,然后使用调用gradle。 gradle 命令。在这两种情况下,您都使用gradle,但前者更方便,并确保不同机器之间的版本一致性。

阅读更多信息 -



另外,Udacity有一个整洁,解释Gradle包装器概念的高级视频 -

What is the difference between using gradlew and gradle or are they the same?

解决方案

The difference lies in the fact that ./gradlew indicates you are using a gradle wrapper. The wrapper is generally part of a project and it facilitates installation of gradle. If you were using gradle without the wrapper you would have to manually install it - for example, on a mac brew install gradle and then invoke gradle using the gradle command. In both cases you are using gradle, but the former is more convenient and ensures version consistency across different machines.

Read more here - https://docs.gradle.org/current/userguide/gradle_wrapper.html

Also, Udacity has a neat, high level video explaining the concept of the gradle wrapper - https://www.youtube.com/watch?v=1aA949H-shk

这篇关于使用gradlew和gradle的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 02:56