forked from programmiersportgruppe/akre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
120 lines (102 loc) · 3.53 KB
/
build.sbt
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
crossScalaVersions := Seq("2.10.4", "2.11.5")
scalaVersion := crossScalaVersions.value.head
publishMavenStyle := true
publishArtifact := false
useGpg := true
def mavenRepository(isSnapshot: Boolean): Some[MavenRepository] = {
def nexus = "https://oss.sonatype.org/"
if (isSnapshot)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
publishTo := mavenRepository(isSnapshot.value)
lazy val akkaVersion = Def.setting("2.3.9")
lazy val akkaActor = Def.setting("com.typesafe.akka" %% "akka-actor" % akkaVersion.value)
val sharedSettings = Seq[Def.Setting[_]](
name := "akre-" + name.value,
homepage := Some(url("https://github.com/programmiersportgruppe/akre")),
scmInfo := Some(ScmInfo(
browseUrl = new URL("https://github.com/programmiersportgruppe/akre"),
connection = "scm:git:[email protected]:programmiersportgruppe/akre.git"
)),
licenses := Seq("MIT Licence" -> new URL("http://opensource.org/licenses/MIT")),
organization := "org.programmiersportgruppe.akre",
conflictManager := ConflictManager.strict,
dependencyOverrides += "org.scala-lang" % "scala-library" % scalaVersion.value,
scalacOptions := Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked",
"-Xlint",
"-Xfatal-warnings",
"-Yclosure-elim",
"-Ydead-code",
"-Yno-adapted-args",
"-Ywarn-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-inaccessible",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-Ywarn-numeric-widen",
// "-Ywarn-value-discard", // possibly more trouble than it's worth
"-Xfuture") ++ (
if (scalaVersion.value.startsWith("2.10.")) Nil
else Seq(
"-explaintypes",
"-Yconst-opt",
"-Ywarn-infer-any",
"-Ywarn-unused",
"-Ywarn-unused-import")
),
pomExtra := {
<developers>
<developer>
<id>barnardb</id>
<name>Ben Barnard</name>
<url>https://github.com/barnardb</url>
</developer>
</developers>
},
testOptions in Test += Tests.Argument("-oF"),
publishTo := mavenRepository(isSnapshot.value)
)
lazy val core = project
.settings(sharedSettings: _*)
.settings(
description := "Core Redis abstractions for Akre.",
libraryDependencies <+= akkaActor, // for `akka.util.ByteString`
libraryDependencies += "com.typesafe.akka" %% "akka-testkit" % akkaVersion.value % "test",
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.3" % "test"
)
def coreDependency = core % "compile->compile;test->test"
lazy val commands = project
.dependsOn(coreDependency)
.settings(sharedSettings: _*)
.settings(
description := "Scala abstractions for Redis commands.",
libraryDependencies <+= akkaActor
)
lazy val protocol = project
.dependsOn(coreDependency)
.settings(sharedSettings: _*)
.settings(
description := "A RESP (REdis Serialization Protocol) implementation.",
libraryDependencies ++= (
if (scalaVersion.value startsWith "2.11.") Seq("org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3")
else Nil
)
)
lazy val client = project
.dependsOn(protocol, commands, coreDependency)
.settings(sharedSettings: _*)
.settings(
description := "A Scala Redis client with pipelining, connection pooling, and a Future-based interface, implemented using Akka."
)
lazy val fake = project
.dependsOn(commands, coreDependency)
.settings(sharedSettings: _*)
.settings(
description := "A Redis fake for the JVM, implemented using Akka."
)