I have an sbt project of standard structure. I'd like to have file, which I could separate from my build and to specify there values for use in Build.scala or build.sbt (to omit spoiling repository with local configurations).
It may be plain .properties format or scala file, or typesafe config, or any other (common .sbt practice is most welcomed of course):
prop1=value1
prop2=42
.......
Is there common practice for this so values are accessible in sbt build files? I want to pass them as test arguments to keep off of build files themselves.
I had a similar problem. I created a github repository with the solution:
https://github.com/darkocerdic/sbt-config
Create a new file at project/resources/local.properties and add new values for values already in default.properties file.
local.properties file is in .gitignore so it will not propagate outside your local setup.
Look at build.sbt for example usage of defined properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With