Created
November 11, 2013 20:40
-
-
Save danieldietrich/7419965 to your computer and use it in GitHub Desktop.
sbt 0.13 project configuration template targeting scala 2.10.3 and eclipse ide
This file contains 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
sbt.version=0.13.0 |
This file contains 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 Keys._ | |
object ScalaBuild extends Build { | |
val buildOrganization = "my.group.id" | |
val buildName = "project-template" | |
val buildVersion = "1.0-SNAPSHOT" | |
val buildScalaVersion = "2.10.3" | |
val buildScalacOptions = Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-feature", "-unchecked", "-Ywarn-adapted-args") | |
val buildDependencies = Seq( | |
"org.scala-lang" % "scala-reflect" % buildScalaVersion, | |
"org.scalatest" % "scalatest_2.10" % "2.0" % "test") | |
val buildResolvers = Seq( | |
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/") | |
val projectSettings = Defaults.defaultSettings ++ Seq( | |
organization := buildOrganization, | |
version := buildVersion, | |
scalaVersion := buildScalaVersion, | |
scalacOptions := buildScalacOptions, | |
libraryDependencies := buildDependencies, | |
resolvers := buildResolvers, | |
// 'sbt publish' to local maven repository | |
publishMavenStyle := true, | |
publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath + "/.m2/repository")))) | |
val main = Project( | |
buildName, | |
file("."), | |
settings = projectSettings) | |
} |
This file contains 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
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Without the dependency
"org.scala-lang" % "scala-reflect" % buildScalaVersion
the compilation of a simple Scala classfails with