2

I have 2 sbt sub projects and would like to share certain files between the two projects. I have shown shared files under the config below. I would like to read these files in app1 and app2 at runtime. I have looked at this post sharing resources between sbt projects but that seems to have some limitation.

Here is the directory structure i am working with:

root/
 config/               // NEED TO SHARED THESE FILES WITH APP1 and APP2
   file1.txt
   file2.txt
 app1/
   build.sbt
   src/
 app2/
   build.sbt
   src/
 project
 build.sbt

How should my build.sbt be structured so that I can share the config directory between app1 and app2?

Community
  • 1
  • 1
jesukumar
  • 1,139
  • 9
  • 19
  • create common jar file which is loaded from both app1 and app2 , and then load it as resource file. http://stackoverflow.com/questions/27360977/how-to-read-files-from-resources-folder-in-scala – ymonad Jan 14 '16 at 06:44
  • Move your root to subproject and make it depends on app1 and app2. See http://stackoverflow.com/a/35002150/651140 as example. – Andrzej Jozwik Jan 25 '16 at 21:37

0 Answers0