xsbt-filter icon indicating copy to clipboard operation
xsbt-filter copied to clipboard

Reading from outside project

Open aldrinleal opened this issue 11 years ago • 1 comments

Silly question: How could I read, say, from $HOME/.sbt/0.13/credentials.properties? In my case, I want to check in, but not persist AWS Variables

If possible, just update the README.md with an example

Thanks

aldrinleal avatar Nov 23 '13 11:11 aldrinleal

sorry, at the moment this is not supported by this plugin, but you can use the extraProps key for now:

you can read a property file and then assign the values from that property file to the extraProps settings. something like this:

def readPropsAsMap(path: java.io.File) = {
  import scala.collection.JavaConverters._ 
  val props = new Properties
  IO.load(props, path)
  props.asScala
}

and then assign to extraProps:

extraProps := readPropsAsMap(new java.io.File("~/bla.props")).toSeq

hope this helps

sdb avatar Dec 13 '13 15:12 sdb