-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
70 lines (52 loc) · 1.66 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
import scala.sys.process._
name := "spray-jwt"
organization := "com.github.janjaali"
version := "1.0.0"
licenses := Seq("MIT License" -> url("https://opensource.org/licenses/MIT"))
homepage := Some(url("https://github.com/janjaali/spray-jwt"))
scmInfo := Some(
ScmInfo(
url("https://github.com/janjaali/spray-jwt"),
"scm:[email protected]/janjaali/spray-jwt.git"
)
)
developers := List(
Developer(
id = "ghashange",
name = "ghashange",
email = "",
url = url("https://github.com/janjaali")
)
)
scalaVersion := "2.12.3"
publishMavenStyle := true
publishArtifact in Test := false
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) {
Some("snapshots" at nexus + "content/repositories/snapshots")
} else {
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
}
val testDependencies = Seq(
"org.scalatest" %% "scalatest" % "3.0.4" % "test"
)
val dependencies = Seq(
"io.spray" %% "spray-json" % "1.3.3",
"org.bouncycastle" % "bcpkix-jdk15on" % "1.58"
)
libraryDependencies ++= dependencies
libraryDependencies ++= testDependencies
lazy val scalastyleTest = taskKey[Unit]("scalastyleTest")
scalastyleTest := (scalastyle in Test).toTask("").value
(scalastyle in Compile) := ((scalastyle in Compile) dependsOn scalastyleTest).toTask("").value
lazy val installGitHook = taskKey[Unit]("Installs git hooks")
installGitHook := {
if (sys.props("os.name").contains("Windows")) {
"cmd /c copy scripts\\pre-commit-hook.sh .git\\hooks\\pre-commit" !
} else {
"cp scripts/pre-commit-hook.sh .git/hooks/pre-commit" !
}
}
(compile in Compile) := ((compile in Compile) dependsOn installGitHook).value