SBT 0.13.8 SettingKey.~= 方法有什么作用 [英] SBT 0.13.8 what does the SettingKey.~= method do

查看:103
本文介绍了SBT 0.13.8 SettingKey.~= 方法有什么作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SettingKey.~= 方法用于从 libraryDependencies 中排除依赖项(参见 播放 2.3.8 sbt,不包括 logback),但试图找出它的作用是很困难的:

The SettingKey.~= method is used to exclude dependencies from libraryDependencies (see play 2.3.8 sbt excluding logback), but trying to find out what it does is hard as:

  1. http 上没有关于此功能的文档://www.scala-sbt.org/0.13.12/api/index.html#sbt.SettingKey
  2. 无法使用 Google 进行搜索,因为它在方法名称中使用了符号
  3. 检查 SBT 源代码(https://github.com/sbt/sbt/blob/0.13/main/settings/src/main/scala/sbt/Structure.scala#L47) 没有提供明显的答案.
  1. There is no documentation about this function at http://www.scala-sbt.org/0.13.12/api/index.html#sbt.SettingKey,
  2. It cannot be searched using Google as it uses symbols in the method name and
  3. Examination of the SBT source code (https://github.com/sbt/sbt/blob/0.13/main/settings/src/main/scala/sbt/Structure.scala#L47) does not provide an obvious answer.

谁能解释一下这是做什么的?

Can anyone shed light on what this does?

推荐答案

someScopedKey ~= f

相当于

someScopedKey := f(someScopedKey.value)

换句话说,它使用给定的函数转换设置/任务的先前值.这就是关于它的全部信息.

In other words, it transforms the previous value of the setting/task with a given function. That's literally all there is to know about it.

这篇关于SBT 0.13.8 SettingKey.~= 方法有什么作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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