/
build.sbt
88 lines (59 loc) · 3.15 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
organization := "tv.cntt"
name := "xitrum"
version := "3.3-SNAPSHOT"
scalaVersion := "2.10.3"
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked")
// xitrum.util.FileMonitor requires Java 7
javacOptions ++= Seq("-source", "1.7", "-target", "1.7")
// Put config directory in classpath for easier development (sbt console etc.)
unmanagedBase in Runtime <<= baseDirectory { base => base / "config" }
// Most Scala projects are published to Sonatype, but Sonatype is not default
// and it takes several hours to sync from Sonatype to Maven Central
resolvers += "SonatypeReleases" at "http://oss.sonatype.org/content/repositories/releases/"
// Projects using Xitrum must provide a concrete implentation of SLF4J (Logback etc.)
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.6" % "provided"
// An implementation of SLF4J is needed for log in tests to be output
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.1.1" % "test"
// Netty is the core of Xitrum's HTTP(S) feature
libraryDependencies += "io.netty" % "netty-all" % "4.0.17.Final"
// Javassist boosts Netty 4 speed
libraryDependencies += "org.javassist" % "javassist" % "3.18.1-GA"
// For clustering SockJS; Akka is included here
libraryDependencies += "tv.cntt" %% "glokka" % "1.6"
// Redirect Akka log to SLF4J
libraryDependencies += "com.typesafe.akka" %% "akka-slf4j" % "2.2.4"
// For scanning routes
libraryDependencies += "tv.cntt" %% "sclasner" % "1.6"
// For (de)serializing
libraryDependencies += "com.twitter" %% "chill-bijection" % "0.3.5"
// For jsEscape
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.2.1"
libraryDependencies += "org.json4s" %% "json4s-native" % "3.2.7"
// For i18n
libraryDependencies += "tv.cntt" %% "scaposer" % "1.3"
// For compiling CoffeeScript to JavaScript
libraryDependencies += "tv.cntt" % "rhinocoffeescript" % "1.7.1"
// For file watch
libraryDependencies += "com.beachape.filemanagement" % "schwatcher_2.10" % "0.0.9"
// For test
libraryDependencies += "org.scalatest" %% "scalatest" % "2.1.0" % "test"
//------------------------------------------------------------------------------
// JSON4S uses scalap 2.10.0, which in turn uses scala-compiler 2.10.0, which in
// turn uses scala-reflect 2.10.0. We need to force "scalaVersion" above, because
// Scala annotations (used by routes and Swagger) compiled by a newer version
// can't be read by an older version.
//
// Also, we must release a new version of Xitrum every time a new version of
// Scala is released.
libraryDependencies <+= scalaVersion { sv => "org.scala-lang" % "scalap" % sv }
// xitrum.imperatively uses Scala continuation, a compiler plugin --------------
autoCompilerPlugins := true
// https://groups.google.com/forum/?fromgroups#!topic/simple-build-tool/ReZvT14noxU
libraryDependencies <+= scalaVersion { sv =>
compilerPlugin("org.scala-lang.plugins" % "continuations" % sv)
}
scalacOptions += "-P:continuations:enable"
//------------------------------------------------------------------------------
// Skip API doc generation to speedup "publish-local" while developing.
// Comment out this line when publishing to Sonatype.
publishArtifact in (Compile, packageDoc) := false