I'm writing a Play 2.0 project in Scala, and I need to run a command-line tool before SBT starts deciding what to compile (the command will create/replace a .scala file in the project with one generated from some data). I'm a complete novice in SBT, and some quick time on Google didn't turn up anything promising. How should I do this?
6
votes
Do you use scala-sbt.org/release/docs/Howto/generatefiles.html ? That generates files automatically before compiling.
- Schleichardt
You might take a look at the answer for a question I asked last week: stackoverflow.com/questions/15212472/… It should be simple enough to modify that answer for your needs.
- Ryan
1 Answers
1
votes
For creating sources prior to compilation, have a look at source generators:
http://www.scala-sbt.org/0.12.3/docs/Howto/generatefiles.html