Skip to content

Instantly share code, notes, and snippets.

@mosesn
Last active August 29, 2015 14:01
Show Gist options
  • Save mosesn/c8c1292aed2cad623fe9 to your computer and use it in GitHub Desktop.
Save mosesn/c8c1292aed2cad623fe9 to your computer and use it in GitHub Desktop.
fooling around with sbt settings
import sbt._
import Keys._
object Blah extends Build {
val mySettings = Project.defaultSettings ++ Seq[Setting[_]](
crossScalaVersions := Seq("2.9.2", "2.10.4")
)
val moreSettings: Seq[Setting[_]] = (mySettings filter { setting: Setting[_] =>
setting != (crossScalaVersions := Seq("2.9.2", "2.10.4"))
})
lazy val one = Project(
id = "one",
base = file("."),
settings = mySettings
)
lazy val two = Project(
id = "two",
base = file("./src"),
settings = moreSettings
)
}
import sbt._
import Keys._
object Blah extends Build {
val mySettings = Project.defaultSettings ++ Seq[Setting[_]](
crossScalaVersions := Seq("2.9.2", "2.10.4")
)
val moreSettings: Seq[Setting[_]] = mySettings :+
(crossScalaVersions ~= { seq => seq.filter(_ != "2.9.2") })
lazy val one = Project(
id = "one",
base = file("."),
settings = mySettings
)
lazy val two = Project(
id = "two",
base = file("./src"),
settings = moreSettings
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment