-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
84 lines (75 loc) · 2.92 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
name := "lib-play-play28"
organization := "io.flow"
scalaVersion := "2.13.15"
ThisBuild / javacOptions ++= Seq("-source", "17", "-target", "17")
// Resolve scala-xml version dependency mismatch, see https://github.com/sbt/sbt/issues/7007
ThisBuild / libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always,
)
enablePlugins(GitVersioning)
git.useGitDescribe := true
coverageExcludedFiles := ".*\\/app/generated\\/.*"
coverageDataDir := file("target/scala-2.13")
coverageHighlighting := true
coverageFailOnMinimum := true
coverageMinimumStmtTotal := 58
coverageMinimumBranchTotal := 58
lazy val allScalacOptions = Seq(
"-feature",
"-Xfatal-warnings",
"-unchecked",
"-Xcheckinit",
"-Xlint:adapted-args",
"-Ypatmat-exhaust-depth",
"100", // Fixes: Exhaustivity analysis reached max recursion depth, not all missing cases are reported.
"-Wconf:src=generated/.*:silent",
"-Wconf:src=target/.*:silent", // silence the unused imports errors generated by the Play Routes
)
val akkaVersion = play.core.PlayVersion.akkaVersion
lazy val root = project
.in(file("."))
.enablePlugins(PlayScala)
.settings(
scalafmtOnCompile := true,
libraryDependencies ++= Seq(
ws,
filters,
guice,
"com.google.inject" % "guice" % "5.1.0",
"com.google.inject.extensions" % "guice-assistedinject" % "5.1.0",
"io.flow" %% "lib-log" % "0.2.29",
"io.flow" %% "lib-akka-akka26" % "0.2.44",
"com.pauldijou" %% "jwt-play-json" % "5.0.0",
"org.apache.commons" % "commons-io" % "1.3.2",
"org.mockito" % "mockito-core" % "4.11.0" % Test,
"org.typelevel" %% "cats-core" % "2.10.0",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test,
"org.scalatestplus" %% "mockito-3-3" % "3.2.2.0" % Test,
),
scalacOptions ++= allScalacOptions ++ Seq("-release", "17"),
// Suppresses problems with Scaladoc links
Compile / doc / scalacOptions += "-no-link-warnings",
Test / javaOptions += "-Dconfig.file=conf/test.conf",
Test / javaOptions ++= Seq(
"--add-exports=java.base/sun.security.x509=ALL-UNNAMED",
"--add-opens=java.base/sun.security.ssl=ALL-UNNAMED",
),
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/",
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
resolvers += "Artifactory" at "https://flow.jfrog.io/flow/libs-release/",
credentials += Credentials(
"Artifactory Realm",
"flow.jfrog.io",
System.getenv("ARTIFACTORY_USERNAME"),
System.getenv("ARTIFACTORY_PASSWORD"),
),
)
publishTo := {
val host = "https://flow.jfrog.io/flow"
if (isSnapshot.value) {
Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
} else {
Some("Artifactory Realm" at s"$host/libs-release-local")
}
}