forked from xebia-functional/fetch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
123 lines (107 loc) · 3.82 KB
/
Copy pathbuild.sbt
File metadata and controls
123 lines (107 loc) · 3.82 KB
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
import de.heikoseeberger.sbtheader.AutomateHeaderPlugin
import de.heikoseeberger.sbtheader.license.Apache2_0
import catext.Dependencies._
val dev = Seq(Dev("47 Degrees (twitter: @47deg)", "47 Degrees"))
val gh = GitHubSettings("com.fortysevendeg", "fetch", "47 Degrees", apache)
val vAll = Versions(versions, libraries, scalacPlugins)
addCommandAlias("makeDocs", ";docs/tut;docs/makeSite")
pgpPassphrase := Some(sys.env.getOrElse("PGP_PASSPHRASE", "").toCharArray)
pgpPublicRing := file(s"${sys.env.getOrElse("PGP_FOLDER", ".")}/pubring.gpg")
pgpSecretRing := file(s"${sys.env.getOrElse("PGP_FOLDER", ".")}/secring.gpg")
lazy val buildSettings = Seq(
organization := gh.org,
organizationName := gh.publishOrg,
description := "Simple & Efficient data access for Scala and Scala.js",
startYear := Option(2016),
homepage := Option(url("http://47deg.github.io/fetch/")),
organizationHomepage := Option(new URL("http://47deg.com")),
scalaVersion := "2.12.0",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0"),
headers := Map(
"scala" -> Apache2_0("2016", "47 Degrees, LLC. <http://www.47deg.com>")
)
)
lazy val commonSettings = Seq(
resolvers += Resolver.sonatypeRepo("releases"),
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-free" % "0.8.1",
"org.scalatest" %%% "scalatest" % "3.0.0" % "test",
compilerPlugin(
"org.spire-math" %% "kind-projector" % "0.9.3"
)
),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-Ywarn-dead-code",
"-language:higherKinds",
"-language:existentials",
"-language:postfixOps"
),
scalafmtConfig := Some(file(".scalafmt.conf"))
) ++ reformatOnCompileSettings
lazy val allSettings = buildSettings ++
commonSettings ++
sharedCommonSettings ++
miscSettings ++
sharedReleaseProcess ++
credentialSettings ++
sharedPublishSettings(gh, dev)
lazy val fetch = crossProject
.in(file("."))
.settings(moduleName := "fetch")
.settings(allSettings: _*)
.jsSettings(sharedJsSettings: _*)
.enablePlugins(AutomateHeaderPlugin)
lazy val fetchJVM = fetch.jvm
lazy val fetchJS = fetch.js
lazy val root = project
.in(file("."))
.aggregate(fetchJS, fetchJVM, fetchMonixJVM, fetchMonixJS)
.settings(allSettings)
.settings(noPublishSettings)
lazy val docsSettings = ghpages.settings ++ buildSettings ++ tutSettings ++ Seq(
git.remoteRepo := "git@github.com:47deg/fetch.git",
tutSourceDirectory := sourceDirectory.value / "tut",
tutTargetDirectory := sourceDirectory.value / "jekyll",
tutScalacOptions ~= (_.filterNot(Set("-Ywarn-unused-import", "-Ywarn-dead-code"))),
aggregate in doc := true
)
lazy val docs = (project in file("docs"))
.settings(
moduleName := "fetch-docs"
)
.dependsOn(fetchJVM, fetchMonixJVM)
.enablePlugins(JekyllPlugin)
.settings(docsSettings: _*)
.settings(noPublishSettings)
lazy val readmeSettings = buildSettings ++ tutSettings ++ Seq(
tutSourceDirectory := baseDirectory.value,
tutTargetDirectory := baseDirectory.value.getParentFile,
tutScalacOptions ~= (_.filterNot(Set("-Ywarn-unused-import", "-Ywarn-dead-code"))),
tutNameFilter := """README.md""".r
)
lazy val readme = (project in file("tut"))
.settings(
moduleName := "fetch-readme"
)
.dependsOn(fetchJVM)
.settings(readmeSettings: _*)
.settings(noPublishSettings)
lazy val monixSettings = (
libraryDependencies ++= Seq(
"io.monix" %%% "monix-eval" % "2.1.0",
"io.monix" %%% "monix-cats" % "2.1.0"
)
)
lazy val monix = crossProject
.in(file("monix"))
.dependsOn(fetch)
.settings(moduleName := "fetch-monix")
.settings(allSettings: _*)
.jsSettings(sharedJsSettings: _*)
.settings(monixSettings: _*)
.enablePlugins(AutomateHeaderPlugin)
lazy val fetchMonixJVM = monix.jvm
lazy val fetchMonixJS = monix.js