-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
52 lines (41 loc) · 1.76 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
import Dependencies.all
lazy val scala213 = "2.13.8"
lazy val scala212 = "2.12.15"
lazy val supportedScalaVersions = List(scala213, scala212)
lazy val scmUrl = "https://github.com/sky-uk/kafka-topic-loader"
name := "kafka-topic-loader"
organization := "uk.sky"
description := "Reads the contents of provided Kafka topics"
sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
homepage := Some(url(scmUrl))
licenses := List("BSD New" -> url("https://opensource.org/licenses/BSD-3-Clause"))
developers := List(
Developer(
"Sky UK OSS",
"Sky UK OSS",
sys.env.getOrElse("SONATYPE_EMAIL", scmUrl),
url(scmUrl)
)
)
scalaVersion := scala213
crossScalaVersions := supportedScalaVersions
semanticdbEnabled := true
semanticdbVersion := scalafixSemanticdb.revision
tpolecatScalacOptions ++= Set(ScalacOptions.source3)
ThisBuild / scalacOptions ++= Seq("-explaintypes") ++ {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq("-Wconf:msg=annotation:silent")
case _ => Nil
}
}
ThisBuild / scalafixDependencies += Dependencies.Plugins.organizeImports
Test / parallelExecution := false
Test / fork := true
Global / onChangedBuildSource := ReloadOnSourceChanges
libraryDependencies ++= all
addCommandAlias("checkFix", "scalafixAll --check OrganizeImports; scalafixAll --check")
addCommandAlias("runFix", "scalafixAll OrganizeImports; scalafixAll")
addCommandAlias("checkFmt", "scalafmtCheckAll; scalafmtSbtCheck")
addCommandAlias("runFmt", "scalafmtAll; scalafmtSbt")
addCommandAlias("ciBuild", "checkFmt; checkFix; +test")