加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – sbt 0.13.8 – buildSettings和projectSettings有什么

发布时间:2020-12-16 18:36:10 所属栏目:安全 来源:网络整理
导读:我正在为0.13.8编写一个新的插件,我似乎无法弄清楚buildSettings Seq和projectSettings Seq之间的区别. 有人可以澄清吗? 解决方法 从 docs: With auto plugins,all provided settings (e.g. assemblySettings ) are provided by the plugin directly via t
我正在为0.13.8编写一个新的插件,我似乎无法弄清楚buildSettings Seq和projectSettings Seq之间的区别.

有人可以澄清吗?

解决方法

从 docs:

With auto plugins,all provided settings (e.g. assemblySettings) are provided by the plugin directly via the projectSettings method.

后来:

If the plugin needs to append settings at the build-level (that is,in ThisBuild) there’s a buildSettings method. The settings returned here are guaranteed to be added to a given build scope only once regardless of how many projects for that build activate this AutoPlugin.

The globalSettings is appended once to the global settings (in Global). These allow a plugin to automatically provide new functionality or new defaults. One main use of this feature is to globally add commands,such as for IDE plugins.

Use globalSettings to define the default value of a setting.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读