forked from debasishg/scala-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
69 lines (62 loc) · 2.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
name := "RedisClient"
lazy val redisClient = (project in file(".")).settings(coreSettings : _*)
lazy val commonSettings: Seq[Setting[_]] = Seq(
organization := "net.debasishg",
version := "3.20",
scalaVersion := "2.12.10",
crossScalaVersions := Seq("2.12.10", "2.11.12", "2.10.7", "2.13.0"),
scalacOptions in Compile ++= Seq( "-unchecked", "-feature", "-language:postfixOps", "-deprecation" ),
resolvers ++= Seq(
"typesafe repo" at "http://repo.typesafe.com/typesafe/releases/"
)
)
def dockerTestKit(version: String): Seq[ModuleID] = {
Seq("docker-testkit-scalatest", "docker-testkit-impl-docker-java").map("com.whisk" %% _ % version % Test) :+
// https://github.com/eclipse-ee4j/jaxb-ri/issues/1222
"javax.xml.bind" % "jaxb-api" % "2.3.1" % Test
}
lazy val coreSettings = commonSettings ++ Seq(
name := "RedisClient",
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-pool2" % "2.7.0",
"org.slf4j" % "slf4j-api" % "1.7.28",
"org.slf4j" % "slf4j-log4j12" % "1.7.28" % "provided",
"log4j" % "log4j" % "1.2.17" % "provided",
"org.scalatest" %% "scalatest" % "3.0.8" % "test"
) ++
(scalaBinaryVersion.value match {
case "2.10" => dockerTestKit("0.9.8")
case _ => dockerTestKit("0.9.9")
})
,
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")
}.value,
credentials += Credentials(Path.userHome / ".sbt" / "sonatype.credentials"),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { repo => false },
pomExtra := (
<url>https://github.com/debasishg/scala-redis</url>
<licenses>
<license>
<name>Apache 2.0 License</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:debasishg/scala-redis.git</url>
<connection>scm:git:[email protected]:debasishg/scala-redis.git</connection>
</scm>
<developers>
<developer>
<id>debasishg</id>
<name>Debasish Ghosh</name>
<url>http://debasishg.blogspot.com</url>
</developer>
</developers>),
unmanagedResources in Compile += baseDirectory.map( _ / "LICENSE" ).value
)