diff --git a/build.sbt b/build.sbt index 8c96204..bbe8974 100644 --- a/build.sbt +++ b/build.sbt @@ -23,6 +23,7 @@ lazy val root = project.in(file(".")) .settings(BuildSettings.buildSettings) .settings(BuildSettings.publishSettings) .settings(MimaSettings.mimaSettings) + .settings(ScoverageSettings.settings) .settings(Seq( shellPrompt := { _ => name.value + " > " } )) diff --git a/project/ScoverageSettings.scala b/project/ScoverageSettings.scala new file mode 100644 index 0000000..689bbc8 --- /dev/null +++ b/project/ScoverageSettings.scala @@ -0,0 +1,16 @@ +import scoverage.ScoverageKeys._ +import sbt.Keys._ +import sbt._ + +object ScoverageSettings { + + val settings = Seq( + coverageEnabled := true, + coverageMinimum := 80, + coverageFailOnMinimum := true, + coverageHighlighting := false, + (test in Test) := { + (coverageReport dependsOn (test in Test)).value + } + ) +} diff --git a/project/plugins.sbt b/project/plugins.sbt index 5f167a6..5888fe2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,3 @@ addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.3") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.5.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") \ No newline at end of file