gpt4 book ai didi

scala - sbt 0.13.8 -- buildSettings 和 projectSettings 有什么区别?

转载 作者:行者123 更新时间:2023-12-04 20:39:03 26 4
gpt4 key购买 nike

我正在为 0.13.8 编写一个新插件,但我似乎无法弄清楚 buildSettings 之间的区别Seq 和 projectSettings序列

有人可以澄清吗?

最佳答案

来自 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.

关于scala - sbt 0.13.8 -- buildSettings 和 projectSettings 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30018363/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com