/
Build.scala
81 lines (67 loc) · 2.38 KB
/
Build.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import sbt._
import sbt.Keys._
import scala._
import scala.Some
object Build extends Build {
val basicSettings = Seq(
organization := "org.scalastic",
name := "scalastic",
version := "0.90.10",
description := "a scala driver for elasticsearch",
homepage := Some(url("https://github.com/bsadeh/scalastic")),
licenses := Seq("The Apache Software License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
)
val scalaSettings = Seq(
scalaVersion := "2.10.2",
scalacOptions ++= Seq("-unchecked", "-feature", "-deprecation")
)
val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Compile := true,
publishArtifact in Test := false,
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomIncludeRepository := { _ => false },
pomExtra :=
<scm>
<url>scm:git:git@github.com:bsadeh/scalastic.git</url>
<connection>scm:git:git@github.com:bsadeh/scalastic.git</connection>
<developerConnection>scm:git:git@github.com:bsadeh/scalastic.git</developerConnection>
</scm>
<developers>
<developer>
<id>bsadeh</id>
<name>Benny Sadeh</name>
</developer>
<developer>
<id>yatskevich</id>
<name>Ivan Yatskevich</name>
</developer>
</developers>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/bsadeh/scalastic/issues/</url>
</issueManagement>
)
lazy val Root = Project(id = "Root", base = file("."))
.settings(basicSettings: _*)
.settings(scalaSettings: _*)
.settings(publishSettings: _*)
.settings(
resolvers += Resolver.sonatypeRepo("releases"),
libraryDependencies ++= Seq(
"org.elasticsearch" % "elasticsearch" % "0.90.10" withSources,
"com.google.code.findbugs" % "jsr305" % "1.3.9",
"org.clapper" %% "grizzled-slf4j" % "1.0.1" withSources,
"junit" % "junit" % "4.10" % "test" withSources,
"org.scalatest" %% "scalatest" % "2.0" % "test" withSources,
"ch.qos.logback" % "logback-classic" % "1.0.2" % "test" withSources
),
parallelExecution in Test := false
)
}