-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
81 lines (76 loc) · 3.44 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
import scala.collection.Seq
lazy val creds = {
sys.env.get("CI_JOB_TOKEN") match {
case Some(token) =>
Credentials("GitLab Packages Registry", "gitlab.com", "gitlab-ci-token", token)
case _ =>
Credentials(Path.userHome / ".sbt" / ".credentials")
}
}
// Registry ID is the project ID of the project where the package is published, this should be set in the CI/CD environment
val registryId = sys.env.get("REGISTRY_HOST_PROJECT_ID").getOrElse("")
lazy val scala_2_13 = "2.13.14"
val configVersion = "1.4.3"
val playVersion = "3.0.2"
val betterFilesVersion = "3.9.2"
val prometheusClientVersion = "0.9.0"
val scalacticVersion = "3.2.18"
val scalaLoggingVersion = "3.9.5"
val logbackClassicVersion = "1.5.6"
val commonsIOVersion = "2.16.1"
val monixVersion = "3.4.1"
val commonsLangVersion = "3.14.0"
val scalaTestVersion = "3.2.18"
val scalaMockVersion = "6.0.0"
// Don't forget to match the org.scalatestplus artifact with the mockito version
// If you change the mockito version you need to match the scalatestplus group ie org.scalatestplus.mockito-4-2 is for mockito-core 4.2.x
val mockitoVersion = "5.11.0"
val scalaTestPlusMockitoArtifact = "mockito-4-2"
val scalaTestPlusMockitoVersion = "3.2.11.0"
val scalaCheckVersion = "1.18.0"
lazy val root = (project in file("."))
.settings(
name := "util",
organization := "io.mdcatapult.klein",
scalaVersion := scala_2_13,
useCoursier := false,
crossScalaVersions := scala_2_13 :: Nil,
scalacOptions ++= Seq(
"-encoding", "utf-8",
"-unchecked",
"-deprecation",
"-explaintypes",
"-feature",
"-Xlint",
"-Xfatal-warnings",
),
releaseIgnoreUntrackedFiles := true,
resolvers ++= Seq(
"gitlab" at s"https://gitlab.com/api/v4/projects/$registryId/packages/maven",
"Maven Public" at "https://repo1.maven.org/maven2"),
publishTo := {
Some("gitlab" at s"https://gitlab.com/api/v4/projects/$registryId/packages/maven")
},
credentials += creds,
libraryDependencies ++= {
Seq(
"org.scalactic" %% "scalactic" % scalacticVersion % Test,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test,
"org.scalamock" %% "scalamock" % scalaMockVersion % Test,
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % Test,
"org.mockito" % "mockito-core" % mockitoVersion % Test,
"org.scalatestplus" %% scalaTestPlusMockitoArtifact % scalaTestPlusMockitoVersion % Test,
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"com.typesafe" % "config" % configVersion,
"org.playframework" %% "play-json" % playVersion,
"io.monix" %% "monix" % monixVersion,
"com.github.pathikrit" %% "better-files" % betterFilesVersion,
"commons-io" % "commons-io" % commonsIOVersion,
"io.prometheus" % "simpleclient" % prometheusClientVersion,
"io.prometheus" % "simpleclient_hotspot" % prometheusClientVersion,
"io.prometheus" % "simpleclient_httpserver" % prometheusClientVersion,
"ch.qos.logback" % "logback-classic" % logbackClassicVersion,
"org.apache.commons" % "commons-lang3" % commonsLangVersion
)
}
)