我有以下设置键:
val filterValues = SettingKey[Map[String, String]]("filter-values")
所以在定义设置时:
filterValues := Map(
"someKey" -> sys.props.get("some.path").getOrElse(localPath("example"))
…
)
...
private def localFile(path: String): String = ((baseDirectory) { _ / path })(_.getAbsolutePath)
但我得到的是以下类型不匹配:
Build.scala:8: type mismatch;
[error] found : sbt.Def.Initialize[String]
[error] required: String
[error] private def localFile(path: String): String = ((baseDirectory) { _ / path })(_.getAbsolutePath)
这样做的正确方法是什么?(对于 sbt 0.13,顺便说一句)