Skip to content

Instantly share code, notes, and snippets.

@yamashiro
Created May 8, 2012 05:30
Show Gist options
  • Save yamashiro/2632797 to your computer and use it in GitHub Desktop.
Save yamashiro/2632797 to your computer and use it in GitHub Desktop.
sbtのマルチプロジェクト構成
import sbt._
import Keys._
import com.github.retronym.SbtOneJar
object AggregateBuild extends Build {
val specs = "org.specs2" %% "specs2" % "1.9" % "test"
val specsResolver = Seq("snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
"releases" at "http://oss.sonatype.org/content/repositories/releases")
lazy val dependencies = Seq(specs)
def standardSettings = Seq(
exportJars := true,
scalaVersion := "2.9.2",
libraryDependencies ++= dependencies,
resolvers ++= specsResolver
) ++ Defaults.defaultSettings
lazy val root = Project(id = "root",
base = file(".")) aggregate(core, sample)
lazy val core = Project("core",
file("core"),
settings = standardSettings)
lazy val sample = Project("sample",
file("sample"),
settings = standardSettings ++ SbtOneJar.oneJarSettings
) dependsOn (core)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment