Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Trim down SBT build configuration (no need for extra fluff anymore)

  • Loading branch information...
commit 0b366af1a8461dc69301e2eebb7eea623b26717e 1 parent ea8e0d7
@indrajitr indrajitr authored
View
5 .gitignore
@@ -1,6 +1,3 @@
.DS_Store
-lib_managed
-project/boot
target
-target/
-target/**/*
+project/boot
View
33 build.sbt
@@ -1,21 +1,32 @@
name := "RedisClient"
-version := "2.4.0"
-
organization := "net.debasishg"
-scalaVersion := "2.9.0-1"
-
-libraryDependencies += "junit" % "junit" % "4.8.1" % "test"
+version := "2.4.0"
-libraryDependencies += "log4j" % "log4j" % "1.2.16"
+crossScalaVersions := Seq("2.9.0-1", "2.9.0", "2.8.1", "2.8.0")
-libraryDependencies += "org.slf4j" % "slf4j-api" % "1.5.8"
+libraryDependencies <++= scalaVersion { scalaVersion =>
+ // Helper for dynamic version switching based on scalaVersion
+ val scalatestVersion: String => String = Map(("2.8.0" -> "1.3.1.RC2"), ("2.8.1" -> "1.5.1")) getOrElse (_, "1.6.1")
+ // The dependencies with proper scope
+ Seq(
+ "commons-pool" % "commons-pool" % "1.5.6",
+ "org.slf4j" % "slf4j-api" % "1.6.1",
+ "org.slf4j" % "slf4j-log4j12" % "1.6.1" % "provided",
+ "log4j" % "log4j" % "1.2.16" % "provided",
+ "junit" % "junit" % "4.8.1" % "test",
+ "org.scalatest" %% "scalatest" % scalatestVersion(scalaVersion) % "test"
+ )
+}
-libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.5.8"
+scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-Xcheckinit")
-libraryDependencies += "commons-pool" % "commons-pool" % "1.5.6" % "compile"
-
-libraryDependencies += "org.scalatest" % "scalatest_2.9.0" % "1.6.1" % "test"
+// TODO: Enable this with SBT 0.10.2 (See: https://github.com/harrah/xsbt/issues/147)
+// scaladocOptions <++= (name, version) map { (name, ver) =>
+// Seq("-doc-title", name, "-doc-version", ver)
+//}
+publishTo := Some("Scala-Tools Nexus Repository for Releases" at "http://nexus.scala-tools.org/content/repositories/releases")
+credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
View
2  project/build.properties
@@ -1 +1 @@
-sbt.version=0.10.0
+sbt.version=0.10.1
View
27 project/build/RedisClientProject.scala
@@ -1,27 +0,0 @@
-import sbt._
-import sbt.CompileOrder._
-
-class RedisClientProject(info: ProjectInfo) extends DefaultProject(info)
-{
- // override def useDefaultConfigurations = true
- override def compileOptions = super.compileOptions ++
- Seq("-deprecation", "-Xcheckinit", "-encoding", "utf8").map(x => CompileOption(x))
-
-
- val scalaToolsSnapshots = "Scala-Tools Maven2 Snapshots Repository" at "http://scala-tools.org/repo-snapshots"
- val scalaToolsReleases = "Scala-Tools Maven2 Releases Repository" at "http://scala-tools.org/repo-releases"
- val scalatest = "org.scalatest" % "scalatest_2.9.0" % "1.6.1" % "test"
- val junit = "junit" % "junit" % "4.8.1" % "test"
- val log4j = "log4j" % "log4j" % "1.2.16"
- val slf4japi = "org.slf4j" % "slf4j-api" % "1.5.8"
- val slf4j = "org.slf4j" % "slf4j-log4j12" % "1.5.8"
- val commons_pool = "commons-pool" % "commons-pool" % "1.5.6" % "compile" //ApacheV2
-
- override def packageSrcJar = defaultJarPath("-sources.jar")
- lazy val sourceArtifact = Artifact.sources(artifactID)
- override def packageToPublishActions = super.packageToPublishActions ++ Seq(packageSrc)
-
- override def managedStyle = ManagedStyle.Maven
- Credentials(Path.userHome / ".ivy2" / ".credentials", log)
- lazy val publishTo = "Scala Tools Nexus" at "http://nexus.scala-tools.org/content/repositories/releases/"
-}
Please sign in to comment.
Something went wrong with that request. Please try again.