forked from apicollective/apibuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
153 lines (136 loc) · 4.14 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
152
153
import play.PlayImport.PlayKeys._
import play.sbt.PlayImport._
import scoverage.ScoverageSbtPlugin.ScoverageKeys._
name := "apidoc"
organization := "com.bryzek.apidoc"
scalaVersion in ThisBuild := "2.11.7"
// required because of issue between scoverage & sbt
parallelExecution in Test in ThisBuild := true
lazy val lib = project
.in(file("lib"))
.settings(commonSettings: _*)
val avroVersion = "1.7.7"
lazy val avro = project
.in(file("avro"))
.dependsOn(generated, lib)
.aggregate(generated, lib)
.settings(
libraryDependencies ++= Seq(
"org.apache.avro" % "avro" % avroVersion,
"org.apache.avro" % "avro-compiler" % avroVersion,
"com.typesafe.play" %% "play-json" % "2.4.6",
"org.scalatest" %% "scalatest" % "2.2.5" % "test"
)
)
lazy val swagger = project
.in(file("swagger"))
.dependsOn(generated, lib)
.aggregate(generated, lib)
.settings(
libraryDependencies ++= Seq(
"io.swagger" % "swagger-parser" % "1.0.5",
"com.typesafe.play" %% "play-json" % "2.4.6",
"org.scalatest" %% "scalatest" % "2.2.5" % "test"
)
)
lazy val core = project
.in(file("core"))
.dependsOn(generated, lib, avro, swagger)
.aggregate(generated, lib)
.settings(commonSettings: _*)
.settings(
resolvers += "Typesafe Maven Repository" at "http://repo.typesafe.com/typesafe/maven-releases/",
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.4.6"
)
)
lazy val generated = project
.in(file("generated"))
.enablePlugins(PlayScala)
.settings(
libraryDependencies ++= Seq(
ws
)
)
lazy val api = project
.in(file("api"))
.dependsOn(generated, core)
.aggregate(generated, core)
.enablePlugins(PlayScala)
.settings(commonSettings: _*)
.settings(
routesImport += "com.bryzek.apidoc.api.v0.Bindables._",
resolvers += "Scalaz Bintray Repo" at "https://dl.bintray.com/scalaz/releases",
libraryDependencies ++= Seq(
ws,
jdbc,
"com.typesafe.play" %% "anorm" % "2.5.0",
"org.postgresql" % "postgresql" % "9.4.1207",
"org.mindrot" % "jbcrypt" % "0.3m",
"com.sendgrid" % "sendgrid-java" % "2.2.2",
specs2 % Test,
"org.scalatestplus" %% "play" % "1.4.0-M4" % "test"
)
)
lazy val www = project
.in(file("www"))
.dependsOn(generated, lib)
.aggregate(generated, lib)
.enablePlugins(PlayScala)
.settings(commonSettings: _*)
.settings(
routesImport += "com.bryzek.apidoc.api.v0.Bindables._",
routesGenerator := InjectedRoutesGenerator,
libraryDependencies ++= Seq(
"com.github.tototoshi" %% "scala-csv" % "1.2.2",
"org.pegdown" % "pegdown" % "1.6.0"
)
)
lazy val spec = project
.in(file("spec"))
.dependsOn(generated)
.aggregate(generated)
.enablePlugins(PlayScala)
.settings(
libraryDependencies ++= Seq(
"org.scalatestplus" %% "play" % "1.4.0-M4" % "test"
)
)
lazy val commonSettings: Seq[Setting[_]] = Seq(
name <<= name("apidoc-" + _),
organization := "com.bryzek.apidoc",
libraryDependencies ++= Seq(
"org.atteo" % "evo-inflector" % "1.2.1",
"org.scalatest" %% "scalatest" % "2.2.5" % "test"
),
scalacOptions += "-feature",
coverageHighlighting := true
) ++ publishSettings
lazy val publishSettings: Seq[Setting[_]] = Seq(
publishMavenStyle := true,
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")
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/mit-license.html")),
homepage := Some(url("https://github.com/mbryzek/apidoc")),
pomExtra := (
<scm>
<url>https://github.com/mbryzek/apidoc.git</url>
<connection>scm:git:git@github.com:mbryzek/apidoc.git</connection>
</scm>
<developers>
<developer>
<id>mbryzek</id>
<name>Michael Bryzek</name>
<url>https://github.com/mbryzek</url>
</developer>
</developers>
)
)
publishSettings