Last active
August 29, 2015 14:04
-
-
Save Shiti/c17fdf9994507c2798b0 to your computer and use it in GitHub Desktop.
A build file to show multi-project build with runtime scoped dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import sbt.Keys._ | |
import sbtassembly.Plugin._ | |
import AssemblyKeys._ | |
object SampleBuild extends Build { | |
lazy val module1 = Project( | |
id = "module1", | |
base = file("module1"), | |
settings = Project.defaultSettings ++ Seq( | |
name := "module1", | |
organization := "fancyOrg", | |
version := "1.0", | |
scalaVersion := "2.10.4", | |
libraryDependencies ++= Seq("org.apache.commons" % "commons-io" % "1.3.2" % "runtime") | |
) | |
) | |
lazy val assembly = Project( | |
id = "assembly", | |
base = file("assembly"), | |
settings = Project.defaultSettings ++ Seq( | |
name := "assembly", | |
organization := "fancyOrg", | |
version := "1.0", | |
scalaVersion := "2.10.4" | |
) | |
) dependsOn(module1 % "compile->compile;runtime->runtime") //The assembly module depending on module1 is optional | |
lazy val sample = Project( | |
id = "sample", | |
base = file("."), | |
settings = Project.defaultSettings++ assemblySettings ++ Seq( | |
name := "sample", | |
organization := "fancyOrg", | |
version := "1.0", | |
scalaVersion := "2.10.4" | |
) | |
) aggregate(square,assembly) dependsOn(module1 % "compile->compile;runtime->runtime",assembly) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment