Skip to content

Instantly share code, notes, and snippets.

@jestan
Created December 30, 2011 09:36
Show Gist options
  • Select an option

  • Save jestan/1538984 to your computer and use it in GitHub Desktop.

Select an option

Save jestan/1538984 to your computer and use it in GitHub Desktop.
SBT Project with Scala Continuations
import sbt._
import Keys._
object MyBuild extends Build {
val ProjectVersion = "1.0"
val Organization = "org.yit"
val ScalaVersion = "2.9.1"
val repositories = Seq("scala-tools.org" at "http://scala-tools.org/repo-releases")
def publishToRepository = Some(Resolver.file("Local Maven Repository", Path.userHome / ".m2" / "repository" asFile))
lazy val baseSettings = Defaults.defaultSettings ++ Seq(
version := ProjectVersion,
organization := Organization,
scalaVersion := ScalaVersion,
autoCompilerPlugins := true,
libraryDependencies <<= (scalaVersion, libraryDependencies) { (ver, deps) =>
deps :+ compilerPlugin("org.scala-lang.plugins" % "continuations" % ver)
},
scalacOptions += "-P:continuations:enable",
publishMavenStyle := true,
publishTo := publishToRepository,
resolvers ++= repositories,
checksums := Nil
)
lazy val root = Project(id = "modules", base = file(".")) aggregate(common, core)
lazy val common = Project(id = "common", base = file("common"),
settings = baseSettings ++ Seq(name := "common"))
lazy val core = Project(id = "core", base = file("core"),
settings = baseSettings ++ Seq(name := "core")) dependsOn (common)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment