-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbuild.sbt
165 lines (145 loc) · 4.98 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
154
155
156
157
158
159
160
161
162
163
164
165
import com.typesafe.sbt.pgp.PgpKeys.publishSigned
import com.typesafe.sbt.SbtSite.SiteKeys._
import com.typesafe.sbt.SbtGhPages.GhPagesKeys._
import sbtrelease.ReleaseStep
import sbtrelease.ReleasePlugin.ReleaseKeys.releaseProcess
import sbtrelease.ReleaseStateTransformations._
import sbtrelease.Utilities._
import sbtunidoc.Plugin.UnidocKeys._
val Akka = "2.4.18"
val Elasticsearch = "2.4.5"
val Jna = "4.4.0"
val Postgresql = "42.1.1"
val Shapeless = "2.3.2"
val Scala = "2.12.2"
val ScalaTest = "3.0.3"
organization in ThisBuild := "com.mfglabs"
name in ThisBuild := "akka-stream-extensions"
scalaVersion in ThisBuild := Scala
crossScalaVersions in ThisBuild := Seq("2.11.11", Scala)
publishMavenStyle in ThisBuild := true
bintrayReleaseOnPublish in ThisBuild := false
scalacOptions in ThisBuild ++= Seq(
"-encoding", "UTF-8",
"-target:jvm-1.8",
"-Ydelambdafy:method",
"-Yno-adapted-args",
"-deprecation",
"-feature",
"-language:postfixOps",
"-unchecked",
"-Xfuture",
"-Xlint",
"-Xlint:-missing-interpolator",
"-Xlint:private-shadow",
"-Xlint:type-parameter-shadow",
"-Ywarn-dead-code",
"-Ywarn-unused",
"-Ywarn-unused-import",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xcheckinit"
)
resolvers in ThisBuild ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
Resolver.sonatypeRepo("releases"),
DefaultMavenRepository
)
lazy val commonSettings = Seq(
scmInfo := Some(ScmInfo(url("https://github.com/MfgLabs/akka-stream-extensions"),
"[email protected]:MfgLabs/akka-stream-extensions.git")),
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream" % Akka,
"com.typesafe.akka" %% "akka-stream-testkit" % Akka % Test,
"org.scalatest" %% "scalatest" % ScalaTest % Test
)
)
lazy val publishSettings = Seq(
homepage := Some(url("https://github.com/MfgLabs/akka-stream-extensions")),
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html")),
autoAPIMappings := true,
apiURL := Some(url("https://MfgLabs.github.io/akka-stream-extensions/api/")),
publishMavenStyle := true,
publishArtifact in packageDoc := false,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false }
)
lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)
lazy val docSettings = Seq(
autoAPIMappings := true,
unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(commons, postgres, elasticsearch, shapeless),
site.addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), "api"),
ghpagesNoJekyll := false,
siteMappings ++= Seq(
file("CONTRIBUTING.md") -> "contributing.md",
file("README.md") -> "_includes/README.md"
),
scalacOptions in (ScalaUnidoc, unidoc) ++= Seq(
"-doc-source-url", scmInfo.value.get.browseUrl + s"/tree/${version.value}€{FILE_PATH}.scala",
"-sourcepath", baseDirectory.in(LocalRootProject).value.getAbsolutePath
),
git.remoteRepo := "[email protected]:MfgLabs/akka-stream-extensions.git",
includeFilter in makeSite := "*.html" || "*.css" || "*.png" || "*.jpg" || "*.gif" || "*.js" || "*.swf" || "*.yml" || "*.md" || "*.svg" || "*.eot" || "*.ttf" || "*.woff" || "*.woff2"
)
lazy val all = project.in(file("."))
.aggregate(commons, shapeless, postgres, elasticsearch, docs)
.settings(
name := "commons-all",
noPublishSettings
)
.dependsOn(commons, shapeless, postgres, elasticsearch, docs)
lazy val docs = project
.settings(moduleName := "akka-stream-ext-docs")
.settings(commonSettings)
.settings(noPublishSettings)
.settings(unidocSettings)
.settings(site.settings)
.settings(ghpages.settings)
.settings(docSettings)
.dependsOn(commons, postgres, shapeless, elasticsearch)
.enablePlugins(TutPlugin)
site.jekyllSupport()
lazy val commons = project.in(file("commons"))
.settings(
name := "akka-stream-extensions",
commonSettings,
publishSettings
)
lazy val postgres = project.in(file("extensions/postgres"))
.dependsOn(commons)
.settings(
name := "akka-stream-extensions-postgres",
resolvers += Resolver.bintrayRepo("softprops", "maven"),
libraryDependencies ++= Seq(
"org.postgresql" % "postgresql" % Postgresql % Provided
),
commonSettings,
publishSettings,
fork := true,
parallelExecution in Test := false
)
lazy val elasticsearch = project.in(file("extensions/elasticsearch"))
.dependsOn(commons)
.settings(
name := "akka-stream-extensions-elasticsearch",
libraryDependencies ++= Seq(
"org.elasticsearch" % "elasticsearch" % Elasticsearch % Provided,
"net.java.dev.jna" % "jna" % Jna % Test
),
commonSettings,
publishSettings
)
lazy val shapeless = project.in(file("extensions/shapeless"))
.dependsOn(commons)
.settings(
name := "akka-stream-extensions-shapeless",
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % Shapeless
),
commonSettings,
publishSettings
)