-
Notifications
You must be signed in to change notification settings - Fork 3
/
CommonProject.scala
55 lines (52 loc) · 1.45 KB
/
CommonProject.scala
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
// Copyright 2016 Carl Pulley
import sbt.Keys._
import sbt._
import scoverage.ScoverageKeys.{coverageExcludedFiles, coverageFailOnMinimum, coverageMinimum}
/**
* Common project settings
*/
object CommonProject {
val settings =
Seq(
organization := "net.cakesolutions",
scalacOptions in Compile ++= Seq(
"-encoding", "UTF-8",
"-feature",
"-deprecation",
"-unchecked",
"-language:postfixOps",
"-language:implicitConversions",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture",
"-Ywarn-unused-import",
"-Ypartial-unification",
"-Xfatal-warnings"
),
scalacOptions in (Compile, doc) ++= {
val nm = (name in(Compile, doc)).value
val ver = (version in(Compile, doc)).value
DefaultOptions.scaladoc(nm, ver)
},
javacOptions in (Compile, compile) ++= Seq(
"-source", "1.8",
"-target", "1.8",
"-Xlint:all",
"-Xlint:-options",
"-Xlint:-path",
"-Xlint:-processing",
"-Werror"
),
javacOptions in doc := Seq(),
javaOptions += "-Xmx2G",
outputStrategy := Some(StdoutOutput),
testOptions in Test += Tests.Argument("-oFD"),
fork := true,
fork in test := true,
coverageMinimum := 100,
coverageFailOnMinimum := true,
coverageExcludedFiles := ".*/target/.*"
)
}