1

I use the sbt-buildinfo SBT plugin, which works great.

I would like to improve the following thing: currently, all values in the generated file can only change if the whole sbt project is reloaded, and thus not at every compile run. I would therefore like to prevent BuildInfo from being regenerated at compile time, and instead, directly generate it at project load time only.

Is this possible?

Jean-Philippe Pellet
  • 59,296
  • 21
  • 173
  • 234
  • I tried with sbt-buildinfo 0.5.0. It's not going to regenerate on every compile, unless the generated file is removed or modified. Is there something that modifies the generated source file silently? Scalariform, for example. – thirstycrow Mar 11 '16 at 04:00
  • No, nothing is modifying it AFAIK. – Jean-Philippe Pellet Mar 11 '16 at 09:44

1 Answers1

2

My bad. sbt-buildinfo is smarter than I am… It indeed doesn't regenerate the file if it doesn't need to. In my case, it was regenerating it because I ad added the BuildInfoOption.BuildTime option, which adds the build time to BuildInfo, and which causes the regeneration.

Jean-Philippe Pellet
  • 59,296
  • 21
  • 173
  • 234