-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
112 lines (102 loc) · 3.08 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
lazy val scala212 = "2.12.10"
lazy val scala213 = "2.13.1"
lazy val supportedScalaVersions = List(scala212, scala213)
scalaVersion in ThisBuild := scala212
crossScalaVersions in ThisBuild := supportedScalaVersions
lazy val commonSettings = Seq(
organization := "io.github.howardjohn",
version := "0.2.2-SNAPSHOT"
)
def commonOptions(scalaVersion: String) =
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 12)) =>
Seq("-Ypartial-unification")
case _ => Seq.empty
}
lazy val root = project
.in(file("."))
.settings(commonSettings)
.settings(crossScalaVersions := Nil)
.settings(noPublishSettings)
.aggregate(circe, play, tests)
lazy val CirceVersion = "0.12.3"
lazy val PlayVersion = "2.8.0-M7"
lazy val ScanamoVersion = "1.0.0-M12"
lazy val ScalaTestVersion = "3.1.0-RC2"
lazy val circe = project
.in(file("scanamo-circe"))
.settings(commonSettings)
.settings(scalacOptions := commonOptions(scalaVersion.value))
.settings(publishSettings)
.settings(
moduleName := "scanamo-circe",
libraryDependencies ++=
Seq(
"io.circe" %% "circe-parser" % CirceVersion,
"org.scanamo" %% "scanamo" % ScanamoVersion,
"org.scalatest" %% "scalatest" % ScalaTestVersion % "test"
)
)
.dependsOn(tests % "test")
lazy val play = project
.in(file("scanamo-play-json"))
.settings(commonSettings)
.settings(scalacOptions := commonOptions(scalaVersion.value))
.settings(publishSettings)
.settings(
moduleName := "scanamo-play-json",
libraryDependencies ++=
Seq(
"com.typesafe.play" %% "play-json" % PlayVersion,
"org.scanamo" %% "scanamo" % ScanamoVersion,
"org.scalatest" %% "scalatest" % ScalaTestVersion % "test"
)
)
.dependsOn(tests % "test")
lazy val tests = project
.in(file("tests"))
.settings(commonSettings)
.settings(scalacOptions := commonOptions(scalaVersion.value))
.settings(publishSettings)
.settings(
moduleName := "scanamo-json-tests",
libraryDependencies ++=
Seq(
"org.scanamo" %% "scanamo" % ScanamoVersion,
"org.scalatest" %% "scalatest" % ScalaTestVersion
)
)
lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val publishSettings = Seq(
homepage := Some(url("https://github.com/howardjohn/scanamo-json")),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(
ScmInfo(
url("https://github.com/howardjohn/scanamo-json"),
"scm:[email protected]:howardjohn/scanamo-json.git"
)),
developers := List(
Developer(
id = "howardjohn",
name = "John Howard",
email = "[email protected]",
url = url("https://github.com/howardjohn/")
)
),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ =>
false
},
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")
}
)