diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-09 00:29:26 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-09 00:35:02 -0400 |
commit | f56a035e5df98bc4e2bf90a1be5a7317be7ef667 (patch) | |
tree | ed5fe21c4e5350b47d1dcc22e6007577dd13191e /stage2/mixins.scala | |
parent | b103b922f8671e7f45cef0cbd876ebe26cb0a2fa (diff) | |
download | cbt-f56a035e5df98bc4e2bf90a1be5a7317be7ef667.tar.gz cbt-f56a035e5df98bc4e2bf90a1be5a7317be7ef667.tar.bz2 cbt-f56a035e5df98bc4e2bf90a1be5a7317be7ef667.zip |
scala paradise plugin
Diffstat (limited to 'stage2/mixins.scala')
-rw-r--r-- | stage2/mixins.scala | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/stage2/mixins.scala b/stage2/mixins.scala index 1383324..48e54e1 100644 --- a/stage2/mixins.scala +++ b/stage2/mixins.scala @@ -10,3 +10,32 @@ trait Test extends BasicBuild{ trait SbtTest extends Test{ override def sources = Vector( projectDirectory.parent ++ "/src/test/scala" ) } + +trait ScalaParadise extends BasicBuild{ + def scalaParadiseVersion = "2.1.0" + + private def scalaParadiseDependency = + Resolver( mavenCentral ).bindOne( + "org.scalamacros" % ("paradise_" ++ scalaVersion) % scalaParadiseVersion + ) + + override def dependencies = ( + super.dependencies // don't forget super.dependencies here + ++ ( + if(scalaVersion.startsWith("2.10.")) + Seq(scalaParadiseDependency) + else + Seq() + ) + ) + + override def scalacOptions = ( + super.scalacOptions + ++ ( + if(scalaVersion.startsWith("2.10.")) + Seq("-Xplugin:"++scalaParadiseDependency.exportedClasspath.string) + else + Seq() + ) + ) +} |