-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
133 lines (103 loc) · 4.01 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// name of the project
name := "skink"
version := "2.0-SNAPSHOT"
organization := "au.edu.mq.comp"
// Scala compiler settings
scalaVersion := "2.12.5"
scalacOptions := {
// Turn on all lint warnings, except:
// - stars-align: incorrectly reports problems if pattern matching of
// unapplySeq extractor doesn't match sequence directly
val lintOption =
if (scalaVersion.value.startsWith ("2.10"))
"-Xlint"
else
"-Xlint:-stars-align,-unused,_"
Seq (
"-deprecation",
"-feature",
"-sourcepath", baseDirectory.value.getAbsolutePath,
"-unchecked",
"-Xfatal-warnings",
"-Xcheckinit",
"-Yrangepos",
lintOption
)
}
// Interactive settings
logLevel := Level.Info
shellPrompt := {
state =>
Project.extract(state).currentRef.project + " " + version.value +
" " + scalaVersion.value + "> "
}
// Dependencies
libraryDependencies ++=
Seq (
"org.bitbucket.franck44.automat" %% "automat" % "1.2.1-SNAPSHOT",
"org.bitbucket.inkytonik.kiama" %% "kiama" % "2.2.0",
"org.bitbucket.inkytonik.kiama" %% "kiama" % "2.2.0" % "test" classifier ("tests"),
"org.bitbucket.inkytonik.kiama" %% "kiama-extras" % "2.2.0",
"org.bitbucket.inkytonik.kiama" %% "kiama-extras" % "2.2.0" % "test" classifier ("tests"),
"org.bitbucket.inkytonik.scalallvm" %% "scalallvm" % "0.2.0-SNAPSHOT",
"org.bitbucket.franck44.scalasmt" %% "scalasmt" % "2.1.1-SNAPSHOT",
"org.scalatest" %% "scalatest" % "3.0.4" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.5" % "test",
"com.typesafe.scala-logging" %% "scala-logging" % "3.7.2",
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
resolvers ++= Seq (
Resolver.sonatypeRepo ("releases"),
Resolver.sonatypeRepo ("snapshots")
)
javaOptions in run += "-Dlogback.configurationFile=src/test/resources/logback-test.xml"
scalacOptions in (Compile,doc) ++= Seq("-groups", "-implicits", "-diagrams",
// "-diagrams-dot-path",
// "/usr/local/bin/dot",
// "-diagrams-debug",
"-diagrams-dot-restart", "50")
// Fork runs and tests
fork := true
javaOptions in run += "-Xss16m"
// Assembly settings
test in assembly := {}
mainClass in assembly := Some ("au.edu.mq.comp.skink.Main")
assemblyMergeStrategy in assembly ~=
(old =>
{
case "logback-test.xml" => MergeStrategy.discard
case x => old(x)
})
// ScalariForm
import scalariform.formatter.preferences._
scalariformPreferences := scalariformPreferences.value
.setPreference (AlignSingleLineCaseStatements, true)
.setPreference (DanglingCloseParenthesis, Force)
.setPreference (IndentSpaces, 4)
.setPreference (SpaceBeforeColon, true)
.setPreference (SpacesAroundMultiImports, false)
// File headers
// Use headerCheck to check which files need new headers
// Use headerCreate in sbt to generate the headers
// Use Test/headerCheck etc to do same in test code
headerLicense := Some(HeaderLicense.Custom(
"""This file is part of Skink.
|
|Copyright (C) 2015-2018
|Programming Languages and Verification Research Group
|Macquarie University
|
|Skink is free software: you can redistribute it and/or modify
|it under the terms of the GNU Lesser General Public License as published
|by the Free Software Foundation, either version 3 of the License, or
|(at your option) any later version.
|
|Skink is distributed in the hope that it will be useful,
|but WITHOUT ANY WARRANTY; without even the implied warranty of
|MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|GNU Lesser General Public License for more details.
|
|See COPYING and COPYING.LESSER for full license terms.
|More information at http://www.gnu.org/licenses.
|""".stripMargin
))