-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.sbt
127 lines (99 loc) · 3.82 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
import xml.Group
// import scalariform.formatter.preferences._
organization := "io.backchat.hookup"
name := "hookup"
version := "0.4.3-SNAPSHOT"
scalaVersion := "2.10.5"
crossScalaVersions := Seq("2.10.5", "2.11.7")
compileOrder := CompileOrder.ScalaThenJava
libraryDependencies ++= Seq(
"io.netty" % "netty" % "3.10.4.Final",
"com.github.nscala-time" %% "nscala-time" % "1.8.0",
"org.json4s" %% "json4s-jackson" % "3.2.11" % "compile",
"commons-io" % "commons-io" % "2.4",
"com.typesafe.akka" %% "akka-actor" % "2.3.12" % "compile",
"com.typesafe.akka" %% "akka-testkit" % "2.3.12" % "test",
"org.specs2" %% "specs2-core" % "3.6.4" % "test",
"org.specs2" %% "specs2-junit" % "3.6.4" % "test",
"junit" % "junit" % "4.11" % "test",
"joda-time" % "joda-time" % "2.8.2"
)
scalacOptions ++= Seq(
"-optimize",
"-deprecation",
"-unchecked",
"-Xcheckinit",
"-Yrangepos",
"-encoding", "utf8")
parallelExecution in Test := false
testOptions := Seq(Tests.Argument("console", "junitxml"))
testOptions <+= (crossTarget, resourceDirectory in Test) map { (ct, rt) =>
Tests.Setup { () =>
System.setProperty("specs2.junit.outDir", new File(ct, "specs-reports").getAbsolutePath)
System.setProperty("java.util.logging.config.file", new File(rt, "logging.properties").getAbsolutePath)
}
}
scalacOptions ++= Seq("-language:implicitConversions")
publishMavenStyle := true
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
publishArtifact in Test := false
pomIncludeRepository := { x => false }
packageOptions <<= (packageOptions, name, version, organization) map {
(opts, title, version, vendor) =>
opts :+ Package.ManifestAttributes(
"Created-By" -> "Simple Build Tool",
"Built-By" -> System.getProperty("user.name"),
"Build-Jdk" -> System.getProperty("java.version"),
"Specification-Title" -> title,
"Specification-Vendor" -> "Mojolly Ltd.",
"Specification-Version" -> version,
"Implementation-Title" -> title,
"Implementation-Version" -> version,
"Implementation-Vendor-Id" -> vendor,
"Implementation-Vendor" -> "Mojolly Ltd.",
"Implementation-Url" -> "https://backchat.io"
)
}
homepage := Some(url("https://backchatio.github.com/hookup"))
startYear := Some(2012)
licenses := Seq(("MIT", url("http://github.com/backchatio/hookup/raw/HEAD/LICENSE")))
pomExtra <<= (pomExtra, name, description) {(pom, name, desc) => pom ++ Group(
<scm>
<connection>scm:git:git://github.com/backchatio/hookup.git</connection>
<developerConnection>scm:git:[email protected]:backchatio/hookup.git</developerConnection>
<url>https://github.com/backchatio/hookup.git</url>
</scm>
<developers>
<developer>
<id>casualjim</id>
<name>Ivan Porto Carrero</name>
<url>http://flanders.co.nz/</url>
</developer>
</developers>
)}
//seq(scalariformSettings: _*)
//
//ScalariformKeys.preferences :=
// (FormattingPreferences()
// setPreference(IndentSpaces, 2)
// setPreference(AlignParameters, false)
// setPreference(AlignSingleLineCaseStatements, true)
// setPreference(DoubleIndentClassDeclaration, true)
// setPreference(RewriteArrowSymbols, true)
// setPreference(PreserveSpaceBeforeArguments, true)
// setPreference(IndentWithTabs, false))
//
//(excludeFilter in ScalariformKeys.format) <<= excludeFilter(_ || "*Spec.scala")
// seq(buildInfoSettings: _*)
buildInfoSettings
sourceGenerators in Compile <+= buildInfo
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)
// buildInfoPackage := "io.backchat.hookup"
// buildInfoPackage := organization
buildInfoPackage <<= organization