/
build.sbt
67 lines (59 loc) · 1.96 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
import sbt._
import Keys._
name := "kmq"
lazy val commonSettings = Seq(
organization := "com.softwaremill.kmq",
version := "0.1",
scalaVersion := "2.12.2",
scalacOptions ++= Seq("-unchecked", "-deprecation"),
// Sonatype OSS deployment
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra :=
<scm>
<url>git@github.com:softwaremill/kmq.git</url>
<connection>scm:git:git@github.com:softwaremill/kmq.git</connection>
</scm>,
licenses := ("Apache2", new java.net.URL("http://www.apache.org/licenses/LICENSE-2.0.txt")) :: Nil,
homepage := Some(new java.net.URL("https://www.softwaremill.com/open-source"))
)
lazy val kmq = (project in file("."))
.settings(commonSettings)
.settings(
publishArtifact := false
)
.aggregate(core, exampleJava, exampleScala)
lazy val core = (project in file("core"))
.settings(commonSettings)
.settings(
libraryDependencies ++= List(
"org.apache.kafka" % "kafka-clients" % "0.10.2.0",
"com.typesafe.akka" %% "akka-actor" % "2.5.0",
"com.typesafe.scala-logging" %% "scala-logging" % "3.5.0"
)
)
lazy val exampleJava = (project in file("example-java"))
.settings(commonSettings)
.settings(
libraryDependencies ++= List(
"org.apache.kafka" %% "kafka" % "0.10.2.0",
"net.manub" %% "scalatest-embedded-kafka" % "0.13.0"
)
) dependsOn(core)
lazy val exampleScala = (project in file("example-scala"))
.settings(commonSettings)
.settings(
libraryDependencies ++= List(
"com.typesafe.akka" %% "akka-stream-kafka" % "0.15",
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
) dependsOn(core)