-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
151 lines (127 loc) · 4.89 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import java.io.ByteArrayOutputStream
import scala.xml._
import scalariform.formatter.preferences._
name := "scapulet"
version := "0.5.1-SNAPSHOT"
organization := "io.backchat.scapulet"
scalaVersion := "2.9.1"
javacOptions ++= Seq("-Xlint:unchecked", "-source", "1.7", "-Xlint:deprecation")
scalacOptions ++= Seq("-optimize", "-unchecked", "-deprecation", "-Xcheckinit", "-encoding", "utf8", "-P:continuations:enable")
autoCompilerPlugins := true
libraryDependencies ++= Seq(
"org.gnu.inet" % "libidn" % "1.15",
"com.google.guava" % "guava" % "10.0.1",
"io.netty" % "netty" % "3.3.1.Final",
"com.typesafe.akka" % "akka-file-mailbox" % "2.0-RC1",
"com.typesafe.akka" % "akka-slf4j" % "2.0-RC1" % "provided",
"com.typesafe.akka" % "akka-testkit" % "2.0-RC1" % "test",
"org.apache.vysper" % "vysper-core" % "0.7" % "test",
compilerPlugin("org.scala-lang.plugins" % "continuations" % "2.9.1"),
compilerPlugin("org.scala-tools.sxr" % "sxr_2.9.0" % "0.2.7"),
"junit" % "junit" % "4.10" % "test",
"org.specs2" %% "specs2" % "1.8.1" % "test",
"org.mockito" % "mockito-all" % "1.9.0" % "test"
)
resolvers += "Akka Releases" at "http://akka.io/releases/"
homepage := Some(url("https://github.com/mojolly/scapulet"))
startYear := Some(2010)
licenses := Seq(("BSD", url("https://github.com/mojolly/scapulet/raw/HEAD/LICENSE")))
pomExtra <<= (pomExtra, name, description) {(pom, name, desc) => pom ++ Group(
<mailingLists>
<mailingList>
<name>Scapulet user group</name>
<archive>http://groups.google.com/group/scapulet-user</archive>
<post>[email protected]</post>
<subscribe>[email protected]</subscribe>
<unsubscribe>[email protected]</unsubscribe>
</mailingList>
</mailingLists>
<scm>
<connection>scm:git:git://github.com/mojolly/scapulet.git</connection>
<developerConnection>scm:git:[email protected]:mojolly/scapulet.git</developerConnection>
<url>https://github.com/mojolly/scapulet</url>
</scm>
<developers>
<developer>
<id>casualjim</id>
<name>Ivan Porto Carrero</name>
<url>http://flanders.co.nz/</url>
</developer>
<developer>
<id>sdb</id>
<name>Stefan De Boey</name>
<url>http://ellefant.be/</url>
</developer>
</developers>
)}
packageOptions <+= (name, version, organization) map {
(title, version, vendor) =>
Package.ManifestAttributes(
"Created-By" -> "Simple Build Tool",
"Built-By" -> System.getProperty("user.name"),
"Build-Jdk" -> System.getProperty("java.version"),
"Specification-Title" -> title,
"Specification-Version" -> version,
"Specification-Vendor" -> vendor,
"Implementation-Title" -> title,
"Implementation-Version" -> version,
"Implementation-Vendor-Id" -> vendor,
"Implementation-Vendor" -> vendor
)
}
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 }
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")
testOptions in Test += Tests.Setup( () => System.setProperty("akka.mode", "test") )
testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "console", "junitxml")
testOptions in Test <+= (crossTarget map { ct =>
Tests.Setup { () => System.setProperty("specs2.junit.outDir", new File(ct, "specs-reports").getAbsolutePath) }
})
//
//sourceGenerators in Compile <+= (sourceManaged in Compile, streams) map { (out, s) =>
// val exceptionMap = Map(
// "" ->
// )
// val vars = XML.load("http://xmpp.org/registrar/disco-features.xml") \\ "var"
// val featureList = vars map { v =>
//"""
// /**
// * %s
// */
// object %s
//"""
// }
//
// val file = out / "io" / "backchat" / "xmpp" / "features.scala"
//
// val container = """
//package io.backchat.xmpp.stanza
//
///**
// * The ''var'' attribute of the <feature/> element within the ''http://jabber.org/protocol/disco#info'' namespace may
// * contain any namespace that is registered with [[http://www.xmpp.org/registrar/namespaces.html the XMPP Registrar]] as well as some additional values
// * that have been separately registered with the Registrar.
// */
//object features {
//%s
//}
//""".format(featureList)
//}