How to reference SBT setup from another module in a multi-module assembly

In a multi-module assembly with an additional server module, I wrote a custom task in server/build.sbt in which I would like to reference the baseDirectory root project. Here is the task:

 lazy val genData = taskKey[Unit]("generate files") genData := { List( Generator(baseDirectory.value.getParentFile, (resourceDirectory in Compile).value) ).foreach(_.makeData()) } 

Instead of baseDirectory.value.getParentFile I would like to write somehing as (baseDirectory in root).value , but this will not work. Any suggestions?

+4
source share
1 answer
 (baseDirectory in LocalRootProject).value 
+8
source

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


All Articles