Skip to content

Instantly share code, notes, and snippets.

@jeremychase
Created November 13, 2013 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremychase/7451262 to your computer and use it in GitHub Desktop.
Save jeremychase/7451262 to your computer and use it in GitHub Desktop.
// TODO this should done as an unmanaged something like this http://www.scala-sbt.org/release/docs/Howto/generatefiles.html
compileAvroSchemas := {
Seq("bash", "-c", "java -jar " + Path.userHome.absolutePath + "/.ivy2/cache/org.apache.avro/avro-tools/jars/avro-tools-" + avroVersion + ".jar compile schema example/src/main/config/schemas/* example/src/main/java") !
}
// TODO This is far from ideal and should use the sbt managedSources
lazy val myClean = taskKey[Unit]("Clean generated files")
myClean := {
Seq("bash", "-c", "rm example/src/main/java/example.com/serialization/generated/*") !
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment