-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
75 lines (50 loc) · 2.76 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
import sbt.Resolver
name := "joblist"
organization := "de.mpicbg.scicomp"
version := "0.8-SNAPSHOT"
scalaVersion := "2.11.7"
resolvers += Resolver.jcenterRepo
//resolvers += Resolver.mavenLocal // just needed for local SNAPSHOT dependencies (disable for release)
// just needed for the unit-tests
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test"
// needed for cli interface
//libraryDependencies += "org.docopt" % "docopt" % "0.6.0-SNAPSHOT"
// see https://github.com/docopt/docopt.java/issues/4
libraryDependencies += "com.offbytwo" % "docopt" % "0.6.0.20150202"
// common utilities
// git clone https://github.com/holgerbrandl/scalautils.git su_tmp && cd su_tmp && sbt publish && rm -rf ../su_tmp
libraryDependencies += "de.mpicbg.scicomp" % "scalautils_2.11" % "0.2"
//libraryDependencies += "com.github.pathikrit" %% "better-files" % "2.14.0"
// add xstream without sub-dependencies because they are optional and contain class-duplicates in pull-parser
// see http://x-stream.github.io/faq.html
// http://x-stream.github.io/http://stackoverflow.com/questions/15560598/play-2-0-sbt-exclude-certain-transitive-dependencies-from-some-all-modules-in
libraryDependencies += "com.thoughtworks.xstream" % "xstream" % "1.4.8" intransitive()
libraryDependencies ++= Seq(
"org.joda" % "joda-convert" % "1.5",
"joda-time" % "joda-time" % "2.3"
)
//libraryDependencies += "org.mapdb" % "mapdb" % "3.0.0-beta2"
sys.env.get("USE_AMMO").isDefined match {
case true => {
println("using ammonite shell")
libraryDependencies += "com.lihaoyi" % "ammonite-repl" % "0.5.2" % "test" cross CrossVersion.full
// note does not work because the wole sb expression can just do ONE thing and not two. Why?
// initialCommands in (Test, console) := """ammonite.repl.Main.run("")"""
}
case false => initialCommands in(Test, console) := """"""
}
initialCommands in(Test, console) := """ammonite.repl.Main.run("")"""
// disable tests
// see http://stackoverflow.com/questions/9763543/how-can-i-skip-tests-in-an-sbt-build
//test in assembly := {joblist.JobListCLI.class}
test in assembly := {}
// to test just some follow http://stackoverflow.com/questions/6997730/how-to-execute-tests-that-match-a-regular-expression-only
//sbt> testOnly com.example.*Spec
//http://www.scala-sbt.org/0.12.4/docs/Detailed-Topics/Testing.html
parallelExecution in Test := false
// http://www.scala-sbt.org/0.12.4/docs/Howto/logging.html
//logLevel in Global := Level.Debug
// http://www.scala-sbt.org/release/docs/Publishing.html#Define+the+repository
publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository")))
// http://stackoverflow.com/questions/8288859/how-do-you-remove-the-scala-version-postfix-from-artifacts-builtpublished-wi
crossPaths := false