diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-22 10:11:46 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-24 11:32:09 -0400 |
commit | 758611576a4f6ceb7020e3cee1f70bbd1cc0b4d8 (patch) | |
tree | 63befde48bed261a1fbed42543206711818858a3 /plugins/scalapb/build | |
parent | 3d321f42c19d2166204079ba7eece66b36037042 (diff) | |
download | cbt-758611576a4f6ceb7020e3cee1f70bbd1cc0b4d8.tar.gz cbt-758611576a4f6ceb7020e3cee1f70bbd1cc0b4d8.tar.bz2 cbt-758611576a4f6ceb7020e3cee1f70bbd1cc0b4d8.zip |
ScalaPB plugin
Diffstat (limited to 'plugins/scalapb/build')
-rw-r--r-- | plugins/scalapb/build/build.scala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/scalapb/build/build.scala b/plugins/scalapb/build/build.scala new file mode 100644 index 0000000..cadee1b --- /dev/null +++ b/plugins/scalapb/build/build.scala @@ -0,0 +1,23 @@ +import cbt._ + +class Build(val context: Context) extends Plugin { + private val scalaPBVersion = "0.5.47" + + override def dependencies = + super.dependencies ++ + Resolver( mavenCentral ).bind( + ScalaDependency( "com.trueaccord.scalapb", "scalapbc", scalaPBVersion ) + ) + + override def compile = { buildInfo; super.compile } + + def buildInfo = lib.writeIfChanged( + projectDirectory / "src_generated/BuildInfo.scala", + s"""// generated file +package cbt.scalapb +object BuildInfo{ + def scalaPBVersion = "$scalaPBVersion" +} +""" + ) +} |