-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
143 lines (103 loc) · 3.58 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
enablePlugins(HaxeJavaPlugin)
enablePlugins(HaxeCSharpPlugin)
enablePlugins(HaxeCppPlugin)
enablePlugins(HaxeFlashPlugin)
enablePlugins(HaxeAs3Plugin)
enablePlugins(HaxePythonPlugin)
enablePlugins(HaxeNekoPlugin)
enablePlugins(HaxePhpPlugin)
enablePlugins(HaxeJsPlugin)
resolvers in ThisBuild += "Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/"
for (c <- Seq(Compile, Test)) yield {
haxeOptions in c ++=
Seq("-D", "scala")
}
for (c <- AllTargetConfigurations ++ AllTestTargetConfigurations) yield {
haxeOptions in c ++=
Seq(
"-D", "no-root",
"-D", "json_stream_no_dot",
"-lib", "continuation")
}
for (c <- Seq(CSharp, TestCSharp)) yield {
haxeOptions in c ++= Seq("-lib", "HUGS", "-D", "CF")
}
releaseUseGlobalVersion := false
releaseCrossBuild := true
haxeOptions in CSharp ++= Seq("-D", "unity", "-D", "dll")
haxeOptions in TestCSharp ++= Seq("-D", "WITHOUTUNITY", "-main", "com.qifun.jsonStream.Main")
haxeOptions in Test ++= Seq("-main", "com.qifun.jsonStream.Main")
haxeOptions in Compile ++= Seq("--macro", "com.qifun.util.Patcher.noExternalDoc()")
haxeOptions in Compile ++= Seq("-dce", "no")
haxeOptions in Test ++= Seq("-dce", "no")
javacOptions in Compile in compile += "-Xlint:-deprecation"
libraryDependencies += "org.scala-stm" %% "scala-stm" % "0.7"
libraryDependencies += "com.qifun" % "haxe-util" % "0.1.0" % HaxeJava classifier "haxe-java"
libraryDependencies += "com.qifun" %% "haxe-scala-library" % "0.2.1" % HaxeJava classifier "haxe-java"
libraryDependencies += "com.qifun.sbt-haxe" %% "test-interface" % "0.1.0" % Test
libraryDependencies += "com.qifun" %% "haxe-scala-stm" % "0.1.4" % HaxeJava classifier "haxe-java"
libraryDependencies += "org.reactivemongo" %% "reactivemongo-bson" % "0.11.6"
crossScalaVersions := Seq("2.10.4", "2.11.2")
doc in Compile := {
(doc in Compile).result.value.toEither match {
case Left(_) => {
// Ignore error
(target in doc in Compile).value
}
case Right(right) => {
right
}
}
}
organization := "com.qifun"
name := "json-stream"
homepage := Some(url(s"https://github.com/qifun/${name.value}"))
startYear := Some(2014)
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html"))
publishTo <<= (isSnapshot) { isSnapshot: Boolean =>
if (isSnapshot)
Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
else
Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
}
releasePublishArtifactsAction := PgpKeys.publishSigned.value
import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeRelease"),
pushChanges
)
scmInfo := Some(ScmInfo(
url(s"https://github.com/qifun/${name.value}"),
s"scm:git:git://github.com/qifun/${name.value}.git",
Some(s"scm:git:[email protected]:qifun/${name.value}.git")))
pomExtra :=
<developers>
<developer>
<id>Atry</id>
<name>杨博 (Yang Bo)</name>
<timezone>+8</timezone>
<email>[email protected]</email>
</developer>
<developer>
<id>zxiy</id>
<name>张修羽 (Zhang Xiuyu)</name>
<timezone>+8</timezone>
<email>[email protected]</email>
</developer>
<developer>
<id>chank</id>
<name>方里权 (Fang Liquan)</name>
<timezone>+8</timezone>
<email>[email protected]</email>
</developer>
</developers>