Mill:如何向模块添加额外资源
Mill: How to add additional Resources to a module
我的模块外有一些文件,我需要在我的类路径中进行测试。
列出所有可能性 (mill resolve tests._
) 我认为扩展 resources
是可行的方法。
我尝试了很多 - 这是我最后一次尝试:
object test extends Tests {
override def resources =
new Sources({
super.resources.self.map(_ :+ (millSourcePath / up / 'data / 'global / 'bpmn))
},
super.resources.ctx
)
...
}
- 覆盖
resources
是正确的选择吗?
- 如何正确完成?
resources
是“资源任务”as defined here。因此,为了向资源路径添加一些东西,你可以做
override def resources = T.sources {
super.resources() :+ PathRef(millSourcePath / up / 'data / 'global / 'bpm)
}
我的模块外有一些文件,我需要在我的类路径中进行测试。
列出所有可能性 (mill resolve tests._
) 我认为扩展 resources
是可行的方法。
我尝试了很多 - 这是我最后一次尝试:
object test extends Tests {
override def resources =
new Sources({
super.resources.self.map(_ :+ (millSourcePath / up / 'data / 'global / 'bpmn))
},
super.resources.ctx
)
...
}
- 覆盖
resources
是正确的选择吗? - 如何正确完成?
resources
是“资源任务”as defined here。因此,为了向资源路径添加一些东西,你可以做
override def resources = T.sources {
super.resources() :+ PathRef(millSourcePath / up / 'data / 'global / 'bpm)
}