-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
80 lines (69 loc) · 2.8 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
import sbt.inConfig
import sbtcrossproject.CrossPlugin.autoImport.{CrossType, crossProject}
import scoverage.ScoverageKeys.coverageEnabled
resolvers += Resolver.sonatypeRepo("snapshots")
val ScalaFixScalacOptions = Seq(
"-Ywarn-adapted-args", // for NoAutoTupling
"-Ywarn-unused", // for RemoveUnused
)
val ScalaFixScalacOptionsOff = Seq(
"-Xfatal-warnings", // it should be disabled for scalafix
)
val mainClassString = "pl.writeonly.linkchecker.scala.impl.LinkCheckerApp"
val mainClassSome = Some(mainClassString)
val Scala12Version = "2.12.10"
scalaVersion := Scala12Version
scapegoatVersion in ThisBuild := "1.3.8"
scalacOptions ++= scalacOptionsFor(scalaVersion.value)
val ScalaPropsVersion = "0.5.5"
val SloggingVersion = "0.6.1"
val ScalazVersion = "7.2.30"
val ZioVersion = "1.0.0-RC17"
val SharedSettings = Seq(
scalaVersion := Scala12Version,
scalacOptions ++= scalacOptionsFor(scalaVersion.value),
scalacOptions ++= ScalaFixScalacOptions,
scalacOptions --= ScalaFixScalacOptionsOff,
mainClass in (Compile, run) := Some(mainClassString),
testFrameworks += new TestFramework("utest.runner.Framework"),
resolvers += Opts.resolver.sonatypeReleases,
libraryDependencies += "com.lihaoyi" %%% "utest" % "0.6.5" % "test",
libraryDependencies ++= Seq(
"com.github.scalaprops" %%% "scalaprops" % ScalaPropsVersion % "test,it",
"com.github.scalaprops" %%% "scalaprops-scalazlaws" % ScalaPropsVersion % "test,it",
),
libraryDependencies += "org.scalaz" %%% "scalaz-core" % ScalazVersion,
libraryDependencies += "org.scalaz" %% "scalaz-concurrent" % ScalazVersion,
libraryDependencies += "org.scalaz" %%% "scalaz-effect" % ScalazVersion,
libraryDependencies += "org.scalaz" %% "scalaz-ioeffect" % "2.10.1",
libraryDependencies += "biz.enef" %%% "slogging" % SloggingVersion,
libraryDependencies += "dev.zio" %% "zio" % ZioVersion,
addCompilerPlugin(scalafixSemanticdb),
wartremoverErrors ++= Warts.unsafe,
scapegoatVersion := "1.3.8",
trapExit := false,
)
val jvmSettings = Seq(
coverageEnabled := true,
mainClass in Compile := mainClassSome,
libraryDependencies ++= Seq(
"biz.enef" %% "slogging-slf4j" % SloggingVersion,
"ch.qos.logback" % "logback-classic" % "1.2.3",
),
)
lazy val linkchecker = crossProject(JVMPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.settings(SharedSettings)
.jvmSettings(jvmSettings)
// IntegrationTest
.configs(IntegrationTest)
.settings(Defaults.itSettings)
.settings(
inConfig(IntegrationTest)(scalafixConfigSettings(IntegrationTest)),
inConfig(IntegrationTest)(ScalafmtPlugin.scalafmtConfigSettings),
unmanagedSourceDirectories in IntegrationTest ++= CrossType.Full.sharedSrcDir(baseDirectory.value, "it").toSeq
)
// PropsTest
.settings(scalapropsCoreSettings)
lazy val hydeJVM = linkchecker.jvm