Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reference a SBT Setting from a different module in a multi-module build

Tags:

sbt

In a multi-module build with a sub module server I have written a custom task in server/build.sbt in which I would like to reference the baseDirectory of the 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 like (baseDirectory in root).value but this doesn't work. Any suggestions?

like image 647
reikje Avatar asked Sep 11 '14 06:09

reikje


1 Answers

(baseDirectory in LocalRootProject).value
like image 92
Kenji Yoshida Avatar answered Sep 24 '22 00:09

Kenji Yoshida