1+ import sbt ._
2+ import Keys ._
3+ import ls .Plugin ._
4+
5+ object SquerylBuild extends Build {
6+
7+ lazy val squeryl = Project (
8+ id = " squeryl" ,
9+ base = file(" ." ),
10+ settings = Project .defaultSettings ++ lsSettings ++ Seq (
11+ description := " A Scala ORM and DSL for talking with Databases using minimum verbosity and maximum type safety" ,
12+ organization := " org.squeryl" ,
13+ version := " 0.9.5-RC2" ,
14+ version <<= version { v => // only release of -Drelease=true is passed to JVM
15+ val release = Option (System .getProperty(" release" )) == Some (" true" )
16+ if (release)
17+ v
18+ else {
19+ val suffix = Option (System .getProperty(" suffix" ))
20+ var i = v.indexOf('-' )
21+ if (i < 0 ) i = v.length
22+ v.substring(0 ,i) + " -" + (suffix getOrElse " SNAPSHOT" )
23+ }
24+ },
25+ parallelExecution := false ,
26+ publishMavenStyle := true ,
27+ scalaVersion := " 2.9.1" ,
28+ crossScalaVersions := Seq (" 2.9.1" ," 2.9.0-1" ," 2.9.0" ," 2.8.1" ," 2.8.0" ),
29+ licenses := Seq (" Apache 2" -> url(" http://www.apache.org/licenses/LICENSE-2.0.txt" )),
30+ homepage := Some (url(" http://www.squeryl.org" )),
31+ pomExtra := (<scm >
32+ <url >git@ github.com: max- l/ squeryl.git</url >
33+ <connection >scm: git: git@ github.com: max- l/ squeryl.git</connection >
34+ </scm >
35+ <developers >
36+ <developer >
37+ <id >max- l</id >
38+ <name >Maxime L évesque</name >
39+ <url >https:// github.com/ max- l</url >
40+ </developer >
41+ <developer >
42+ <id >davewhittaker</id >
43+ <name >Dave Whittaker </name >
44+ <url >https:// github.com/ davewhittaker</url >
45+ </developer >
46+ </developers >),
47+ publishTo <<= version { v => // add credentials to ~/.sbt/sonatype.sbt
48+ val nexus = " https://oss.sonatype.org/"
49+ if (v.trim.endsWith(" SNAPSHOT" ))
50+ Some (" snapshots" at nexus + " content/repositories/snapshots" )
51+ else
52+ Some (" releases" at nexus + " service/local/staging/deploy/maven2" )
53+ },
54+ publishArtifact in Test := false ,
55+ pomIncludeRepository := { _ => false },
56+ // below is for lsync, run "ls-write-version", commit to github, then run "lsync"
57+ (LsKeys .tags in LsKeys .lsync) := Seq (" sql" , " orm" , " query" , " database" , " db" , " dsl" ),
58+ (LsKeys .docsUrl in LsKeys .lsync) := Some (new URL (" http://squeryl.org/api/" )),
59+ libraryDependencies ++= Seq (
60+ " cglib" % " cglib-nodep" % " 2.2" ,
61+ " com.h2database" % " h2" % " 1.2.127" % " provided" ,
62+ " mysql" % " mysql-connector-java" % " 5.1.10" % " provided" ,
63+ " postgresql" % " postgresql" % " 8.4-701.jdbc4" % " provided" ,
64+ " net.sourceforge.jtds" % " jtds" % " 1.2.4" % " provided" ,
65+ " org.apache.derby" % " derby" % " 10.7.1.1" % " provided" ,
66+ " junit" % " junit" % " 4.8.2" % " provided" ),
67+ libraryDependencies <++= scalaVersion { sv =>
68+ Seq (" org.scala-lang" % " scalap" % sv,
69+ if (sv startsWith " 2.9" )
70+ " org.scalatest" % " scalatest_2.9.1" % " 1.6.1" % " test"
71+ else
72+ " org.scalatest" % " scalatest_2.8.2" % " 1.5.1" % " test" )
73+ }))
74+
75+ }
0 commit comments