forked from notyy/CodeAnalyzerTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
108 lines (75 loc) · 3.47 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name := "CodeAnalyzerTutorial"
version := "0.0.1"
isSnapshot := true
organization := "com.github.notyy"
// set the Scala version used for the project
scalaVersion := "2.11.8"
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.13.2" % "test",
"org.pegdown" % "pegdown" % "1.0.2" % "test", //used in html report
"org.scalatest" %% "scalatest" % "2.2.1" % "test",
"org.slf4j" % "slf4j-api" % "1.7.7",
"ch.qos.logback" % "logback-classic" % "1.1.2",
"com.typesafe.scala-logging" %% "scala-logging-slf4j" % "2.1.2"
)
// TODO reopen it later
//testFrameworks += new TestFramework("org.scalameter.ScalaMeterFramework")
logBuffered := false
// reduce the maximum number of errors shown by the Scala compiler
maxErrors := 20
// increase the time between polling for file changes when using continuous execution
pollInterval := 1000
// append several options to the list of options passed to the Java compiler
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
// append -deprecation to the options passed to the Scala compiler
scalacOptions += "-deprecation"
incOptions := incOptions.value.withNameHashing(true)
// disable updating dynamic revisions (including -SNAPSHOT versions)
offline := true
// set the prompt (for this build) to include the project id.
shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " }
// set the prompt (for the current project) to include the username
shellPrompt := { state => System.getProperty("user.name") + "> " }
// disable printing timing information, but still print [success]
showTiming := false
// disable printing a message indicating the success or failure of running a task
showSuccess := false
// change the format used for printing task completion time
timingFormat := {
import java.text.DateFormat
DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT)
}
// only use a single thread for building
parallelExecution := true
// Use Scala from a directory on the filesystem instead of retrieving from a repository
//scalaHome := Some(file("/home/user/scala/trunk/"))
// don't aggregate clean (See FullConfiguration for aggregation details)
aggregate in clean := false
// only show warnings and errors on the screen for compilations.
// this applies to both test:compile and compile and is Info by default
logLevel in compile := Level.Info
// only show warnings and errors on the screen for all tasks (the default is Info)
// individual tasks can then be more verbose using the previous setting
logLevel := Level.Info
// only store messages at info and above (the default is Debug)
// this is the logging level for replaying logging with 'last'
persistLogLevel := Level.Info
// only show 10 lines of stack traces
traceLevel := 10
exportJars := true
// only show stack traces up to the first sbt stack frame
traceLevel := 0
// add SWT to the unmanaged classpath
// unmanagedJars in Compile += file("/usr/share/java/swt.jar")
// seq(oneJarSettings: _*)
// libraryDependencies += "commons-lang" % "commons-lang" % "2.6"
// Execute tests in the current project serially
// Tests from other projects may still run concurrently.
parallelExecution in Test := false
// create beautiful scala test report
testOptions in Test ++= Seq(
Tests.Argument(TestFrameworks.ScalaTest,"-h","target/html-unit-test-report"),
Tests.Argument(TestFrameworks.ScalaTest,"-u","target/unit-test-reports"),
Tests.Argument(TestFrameworks.ScalaTest,"-o"),
Tests.Argument(TestFrameworks.ScalaTest,"-l","FunctionTest")
)