Add the following to your project/plugins.sbt
:
resolvers += "bigtoast-github" at "http://bigtoast.github.com/repo/"
addSbtPlugin("com.github.bigtoast" % "sbt-thrift" % "0.6")
Add the following to your 'build.sbt' ( if you are using build.sbt )
import com.github.bigtoast.sbtthrift.ThriftPlugin
seq(ThriftPlugin.thriftSettings: _*)
Or if you are using a build object extending from Build:
import sbt._
import Keys._
import com.github.bigtoast.sbtthrift.ThriftPlugin
class BuildWithThriftShiz extends Build {
lazy val seniorProject = Project("hola", file("."), settings =
Defaults.defaultSettings ++ ThriftPlugin.thriftSettings ++ Seq(/* custom settings go here */))
}
thrift | Thrift executable. This defaults to just 'thrift' |
|
thrift:generate-java | This will run generate java sources from the thrift sources. This task is automatically executed when compile is run. |
thrift:generate-js | This will run generate javascript sources from the thrift sources. This task is automatically executed during the compile phase if thriftJsEnabled is set to true /td> |
thrift:generate-ruby | This will run generate Ruby sources from the thrift sources. This task is automatically executed during the compile phase if thriftRubyEnabled is set to true /td> |
thrift:generate-python | This will run generate Python sources from the thrift sources. This task is automatically executed during the compile phase if thriftPythonEnabled is set to true /td> |
If any bugs are found or features wanted please file an issue in the github project. I will do my best to accommodate.
I used the following plugins as reference
- my sbt-liquibase plugin
- sbt-protobuf plugin for sbt 0.10
Andrew Headrick bigtoast Ruslan Shevchenko rssh