Illegal dynamic link

jniPath := {
    val subProjectPath = projectDependencies.value map (module => (jniPath in LocalProject(module.name)).value)

    val path = libraryDependencies.value flatMap (_.name)

    path ++ subProjectPath mkString File.pathSeparator
}

Does anyone have a workaround? It seems that the problem comes from (jniPath in LocalProject(module.name)).value, but I see no way to do this, is this a limitation of SBT?

Greetings

+4
source share
3 answers

Greetings for the answers, I solved my problem using key.all(ScopeFilter(in))in Def.taskDyn:

jniPaths := jniPathsImpl(inDependencies(ThisProject))
def jniPathsImpl(in: ScopeFilter.ProjectFilter) = Def.taskDyn {
   ivyJniPath.all(ScopeFilter(in)) map { ivyJniPaths =>
     libraryDependencies.value flatMap (_.name)
   }
}
-1
source

you will need to define your work in the dynamic task http://www.scala-sbt.org/0.13/docs/Tasks.html#Dynamic+Computations+with , which allows you to determine the dependencies of your task based on things that are not defined in compilation time.

, sbt thing.value (thing).map { valueOfThing => ... }, .

+5

fommil, - .

, :

Scala value . , sampleIntTask startServer stopServer.

, .

+1
source

Source: https://habr.com/ru/post/1619078/


All Articles