Skip to content

Instantly share code, notes, and snippets.

@Swind
Created July 23, 2011 00:59
Show Gist options
  • Save Swind/1100795 to your computer and use it in GitHub Desktop.
Save Swind/1100795 to your computer and use it in GitHub Desktop.
sbt 0.11.0 build.sbt example
// Set the project name to the string 'My Project'
name := "SBTProject"
// The := method used in Name and Version is one of two fundamental methods.
// The other method is <<=
// All other initialization methods are implemented in terms of these.
version := "1.0"
//Add Repository Path
resolvers += "db4o-repo" at "http://source.db4o.com/maven"
// Add a single dependency
libraryDependencies += "junit" % "junit" % "4.8" % "test"
libraryDependencies += "com.db4o" % "db4o-full-java5" % "8.1-SNAPSHOT"
// add compile dependencies on some dispatch modules
libraryDependencies ++= Seq(
"com.github.scala-incubator.io" %% "core" % "0.1.1",
"com.github.scala-incubator.io" %% "file" % "0.1.1",
"org.jsoup" % "jsoup" % "1.6.1"
)
// Use the project version to determine the repository to publish to.
publishTo <<= version { (v: String) =>
if(v endsWith "-SNAPSHOT")
Some(ScalaToolsSnapshots)
else
Some(ScalaToolsReleases)
}
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
//sbt 0.10.1
//libraryDependencies += "com.github.mpeltonen" %% "sbt-idea" % "0.10.0"
//sbt 0.11.0
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "0.11.0")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment