sbt tasks as part of the normal build

I have been unable to figure out how to get IntelliJ (CE or Ultimate) with the Scala Plugin to execute any plugin tasks as part of the build, e.g. sbt-protobuf needs to execute its tasks before building.

A standard 'sbt compile' on the console will do this work, but intellij will not.

e.g.:
...

 
import sbtprotobuf.{ProtobufPlugin=>PB}
PB.protobufSettings

...

I have a few other sourceGenerators that are internal plugins, but the same thing holds true here as well, the tasks only get executed by 'sbt compile' and never by intellij. Is there a solution or workaround for this?

1 comment
Comment actions Permalink

Hi! Unfortunately, currently it is not possible to execute arbitrary tasks when making project - it will just compile project using scalac and nothing else. The only workaround is to open "Terminal" pane and use SBT repl there.

0

Please sign in to leave a comment.