Skip to content

Instantly share code, notes, and snippets.

@retrospectacus
Last active February 15, 2019 22:00
Show Gist options
  • Save retrospectacus/38cba3ecdfffe63dcf39ed885172c3b5 to your computer and use it in GitHub Desktop.
Save retrospectacus/38cba3ecdfffe63dcf39ed885172c3b5 to your computer and use it in GitHub Desktop.
PB.targets in Compile := Seq(
scalapb.gen() -> (sourceManaged in Compile).value
)
lazy val generateEventSerializer = TaskKey[Seq[File]]("generateEventSerializer", "Write code for me.")
generateEventSerializer := {
import sys.process._
"./make-proto-serializer.sh".!
Seq.empty[File]
}
Compile / sourceGenerators += (generateEventSerializer dependsOn (PB.generate in Compile)).taskValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment