Skip to content

Commit 15568eb

Browse files
committed
Changes to build process.
Upgraded to SBT 0.11.2 and created a regular (non dsl) SBT build file to make it easier to go multi-module. Added PGP signing and changed publishing from Scala Tools to Sonatype.
1 parent 80432af commit 15568eb

File tree

5 files changed

+91
-63
lines changed

5 files changed

+91
-63
lines changed

build.sbt

Lines changed: 0 additions & 63 deletions
This file was deleted.

project/SquerylBuild.scala

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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+
}

project/plugins.sbt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//PGP Plugin
2+
resolvers += Resolver.url("sbt-plugin-releases",
3+
new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
4+
5+
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
6+
7+
//LS Plugin
8+
resolvers ++= Seq(
9+
"less is" at "http://repo.lessis.me",
10+
"coda" at "http://repo.codahale.com")
11+
12+
addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.1")

release

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if test -f .sbtconfig; then
2+
. .sbtconfig
3+
fi
4+
exec java -Drelease=true ${SBT_OPTS} -jar sbt-launch.jar "$@"

sbt-launch.jar

4.27 KB
Binary file not shown.

0 commit comments

Comments
 (0)