-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
132 lines (110 loc) · 4.73 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
121
122
123
124
125
126
127
128
129
130
131
132
import org.scoverage.coveralls.Imports.CoverallsKeys._
name := "kafka4m"
organization := "com.github.aaronp"
enablePlugins(GhpagesPlugin)
enablePlugins(ParadoxPlugin)
enablePlugins(SiteScaladocPlugin)
enablePlugins(ParadoxMaterialThemePlugin) // see https://jonas.github.io/paradox-material-theme/getting-started.html
//ParadoxMaterialThemePlugin.paradoxMaterialThemeSettings(Paradox)
val username = "aaronp"
val scalaThirteen = "2.13.0"
val defaultScalaVersion = scalaThirteen
crossScalaVersions := Seq(scalaThirteen)
scalaVersion := defaultScalaVersion
paradoxProperties += ("project.url" -> "https://aaronp.github.io/kafka4m/docs/current/")
Compile / paradoxMaterialTheme ~= {
_.withLanguage(java.util.Locale.ENGLISH)
.withColor("blue", "white")
.withLogoIcon("kafka4m")
.withLogoUri(new URI("https://images.app.goo.gl/fSucxpUKKzkWEqKv6"))
.withRepository(uri("https://github.com/aaronp/kafka4m"))
.withSocial(uri("https://github.com/aaronp"))
.withoutSearch()
}
lazy val docker = taskKey[Unit]("Packages the app in a docker file").withRank(KeyRanks.APlusTask)
// see https://docs.docker.com/engine/reference/builder
docker := {
val kafka4mAssembly = (assembly in Compile).value
// contains the docker resources
val deployResourceDir = (resourceDirectory in Compile).value.toPath.resolve("docker")
val dockerTargetDir = {
import eie.io._
val dir = baseDirectory.value / "target" / "docker"
dir.toPath.mkDirs()
}
Build.docker( //
deployResourceDir = deployResourceDir, //
appAssembly = kafka4mAssembly.asPath, //
targetDir = dockerTargetDir, //
logger = sLog.value //
)
}
siteSourceDirectory := target.value / "paradox" / "site" / "main"
siteSubdirName in SiteScaladoc := "api/latest"
libraryDependencies ++= List(
"io.monix" %% "monix" % "3.1.0",
"io.monix" %% "monix-reactive" % "3.1.0",
"io.monix" %% "monix-eval" % "3.1.0",
"com.lihaoyi" %% "sourcecode" % "0.1.9",
"com.github.aaronp" %% "args4c" % "0.7.0",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
"com.typesafe" % "config" % "1.4.0",
"org.apache.kafka" % "kafka-clients" % "2.4.0",
"org.apache.kafka" % "kafka-streams" % "2.4.0"
)
libraryDependencies ++= List(
"com.github.aaronp" %% "eie" % "1.0.0" % Test,
"org.scalactic" %% "scalactic" % "3.1.0" % Test,
"org.scalatest" %% "scalatest" % "3.1.0" % Test,
"com.vladsch.flexmark" % "flexmark-all" % "0.35.10" % Test, //https://github.com/sbt/sbt/issues/5308
"ch.qos.logback" % "logback-classic" % "1.2.3" % Test,
"org.pegdown" % "pegdown" % "1.6.0" % Test,
"junit" % "junit" % "4.13" % Test,
"com.github.aaronp" %% "dockerenv" % "0.5.4" % Test,
"com.github.aaronp" %% "dockerenv" % "0.5.4" % Test classifier ("tests")
)
publishMavenStyle := true
releaseCrossBuild := true
coverageMinimum := 70
coverageFailOnMinimum := true
git.remoteRepo := s"[email protected]:$username/kafka4m.git"
ghpagesNoJekyll := true
releasePublishArtifactsAction := PgpKeys.publishSigned.value
publishConfiguration := publishConfiguration.value.withOverwrite(true)
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)
parallelExecution in Test := false
test in assembly := {}
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
// https://coveralls.io/github/aaronp/kafka4m
// https://github.com/scoverage/sbt-coveralls#specifying-your-repo-token
coverallsTokenFile := Option((Path.userHome / ".sbt" / ".coveralls.kafka4m").asPath.toString)
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)
buildInfoPackage := "kafka4m.build"
// see http://scalameta.org/scalafmt/
scalafmtOnCompile in ThisBuild := true
// see http://www.scalatest.org/user_guide/using_scalatest_with_sbt
testOptions in Test += (Tests.Argument(TestFrameworks.ScalaTest, "-h", s"target/scalatest-reports", "-oN"))
pomExtra := {
<url>https://github.com/aaronp/kafka4m</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>Aaron</id>
<name>Aaron Pritzlaff</name>
<url>http://github.com/aaronp</url>
</developer>
</developers>
}