差异适用于vs apply插件 [英] Difference apply from vs apply plugin

查看:77
本文介绍了差异适用于vs apply插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆