6

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?

Ben Dilts
  • 10,535
  • 16
  • 54
  • 85
  • 2
    Do you use http://www.scala-sbt.org/release/docs/Howto/generatefiles.html ? That generates files automatically before compiling. – Schleichardt Feb 12 '13 at 23:40
  • You might take a look at the answer for a question I asked last week: http://stackoverflow.com/questions/15212472/how-can-i-run-a-bash-script-upon-generating-scaladocs-in-sbt/15214833#15214833 It should be simple enough to modify that answer for your needs. – Ryan Mar 14 '13 at 18:58

1 Answers1

1

For creating sources prior to compilation, have a look at source generators:

http://www.scala-sbt.org/0.12.3/docs/Howto/generatefiles.html

Manuel Bernhardt
  • 3,135
  • 2
  • 29
  • 36