-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
77 lines (68 loc) · 2.41 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
import CompilerOptions._
import Dependencies._
import sbt.Keys.{libraryDependencies, organization, parallelExecution}
import scoverage.ScoverageKeys.coverageFailOnMinimum
// https://github.com/scala/scala
ThisBuild / scalaVersion := "2.13.5"
inThisBuild(
List(
organization := "io.bartholomews",
homepage := Some(url("https://github.com/batholomews/discogs4s")),
licenses += ("GPL", url("http://opensource.org/licenses/GPL-3.0")),
developers := List(
Developer(
"bartholomews",
"Federico Bartolomei",
"discogs4s@bartholomews.io",
url("https://bartholomews.io")
)
)
)
)
val commonSettings = Seq(
scalacOptions ++= compilerOptions,
// http://www.scalatest.org/user_guide/using_scalatest_with_sbt
Test / logBuffered := false,
Test / parallelExecution := false,
Test / testOptions ++= TestSettings.options,
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)
lazy val core = (project in file("modules/core"))
.settings(
commonSettings,
name := "discogs4s-core",
libraryDependencies ++= dependencies ++ testDependencies,
coverageMinimum := 85,
coverageFailOnMinimum := true
)
lazy val circe = (project in file("modules/circe"))
.dependsOn(core % "test->test; compile->compile")
.settings(commonSettings)
.settings(
name := "discogs4s-circe",
libraryDependencies ++= circeDependencies,
coverageMinimum := 85,
coverageFailOnMinimum := true
)
lazy val play = (project in file("modules/play"))
.dependsOn(core % "test->test; compile->compile")
.settings(commonSettings)
.settings(
name := "discogs4s-play",
libraryDependencies ++= playDependencies,
coverageMinimum := 75,
coverageFailOnMinimum := true
)
// https://www.scala-sbt.org/1.x/docs/Multi-Project.html
// https://stackoverflow.com/questions/11899723/how-to-turn-off-parallel-execution-of-tests-for-multi-project-builds
lazy val discogs4s = (project in file("."))
.settings(commonSettings)
.settings(addCommandAlias("test", ";core/test;circe/test;play/test"): _*)
.settings(publish / skip := true)
.aggregate(core, circe, play)
addCommandAlias("test-coverage", ";clean ;coverage ;test ;coverageAggregate")
addCommandAlias("test-fast", "testOnly * -- -l org.scalatest.tags.Slow")
libraryDependencies ++= dependencies ++ testDependencies
coverageMinimum := 76 // FIXME
coverageFailOnMinimum := true