非法动态引用 [英] Illegal dynamic reference
本文介绍了非法动态引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
jniPath := {
val subProjectPath = projectDependencies.value map (module => (jniPath in LocalProject(module.name)).value)
val path = libraryDependencies.value flatMap (_.name)
path ++ subProjectPath mkString File.pathSeparator
}
有人有解决方法吗?似乎问题来自 (jniPath in LocalProject(module.name)).value
,但我看不出有什么方法可以这样做,这是 SBT 的限制吗?
Does anyone have a workaround? It seems that the issue is coming from the (jniPath in LocalProject(module.name)).value
but I can't see any way to do so is this a limitation of SBT?
干杯
推荐答案
为答案干杯,我通过在 Def 中使用
:key.all(ScopeFilter(in))
解决了我的问题.taskDyn
Cheers for the answers, I solved my issue by using key.all(ScopeFilter(in))
in a Def.taskDyn
:
jniPaths := jniPathsImpl(inDependencies(ThisProject))
def jniPathsImpl(in: ScopeFilter.ProjectFilter) = Def.taskDyn {
ivyJniPath.all(ScopeFilter(in)) map { ivyJniPaths =>
libraryDependencies.value flatMap (_.name)
}
}
这篇关于非法动态引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文