差异适用于vs apply插件 [英] Difference apply from vs apply plugin
问题描述
apply from:
- 将(插件).gradle从一个URL
apply plugin:
- 从gradle插件服务器获取(插件).gradle
编辑 - 答案:
应用插件:
调用插件。 apply()接口,而应用于:
直接调用脚本
之间的实际区别适用于:
和 apply plugin:
是前者用于给定的脚本插件到本地文件系统的路径或到远程位置的URL,以及使用插件标识的二进制插件的更高版本。
您可以在Gradle文档中阅读更多信息此处。
Is there a difference except that:
apply from:
- gets the (plugin).gradle from a URL
apply plugin:
- gets the (plugin).gradle from the gradle plugin server
Edit - Answer:
apply plugin:
calls the Plugin.apply() interface, while apply from:
calls the script directly
The actual difference between apply from:
and apply plugin:
is that the former is to be used for script plugins given a path to the local file system or a URL to a remote location, and the later for binary plugins using the plugin id.
You can read more about it in Gradle documentation here.
这篇关于差异适用于vs apply插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!