This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
forked from howardjohn/scala-server-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
executable file
·112 lines (102 loc) · 3.03 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 Scala212Version = "2.12.12"
lazy val Scala213Version = "2.13.1"
def scalacVersionOptions(scalaVersion: String) =
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 12)) => Seq("-Ypartial-unification")
case Some((2, 13)) => Nil
case _ => Nil
}
lazy val commonSettings = Seq(
organization := "io.github.howardjohn",
scalaVersion := Scala212Version,
crossScalaVersions := Seq(Scala212Version, Scala213Version),
version := "0.4.1"
)
lazy val root = project
.in(file("."))
.settings(commonSettings)
.settings(noPublishSettings)
.aggregate(common, tests, http4s, exampleHttp4s)
lazy val CirceVersion = "0.13.0"
lazy val ScalaTestVersion = "3.1.0"
lazy val Http4sVersion = "0.21.8"
lazy val common = project
.in(file("common"))
.settings(commonSettings)
.settings(publishSettings)
.enablePlugins(LibraryProjectPlugin)
.settings(
moduleName := "scala-server-lambda-common",
libraryDependencies ++=
Seq(
"io.circe" %% "circe-generic" % CirceVersion,
"io.circe" %% "circe-parser" % CirceVersion,
"org.scalatest" %% "scalatest" % ScalaTestVersion % "test"
)
)
lazy val tests = project
.in(file("tests"))
.settings(commonSettings)
.settings(publishSettings)
.settings(
moduleName := "scala-server-lambda-tests",
libraryDependencies ++=
Seq(
"org.scalatest" %% "scalatest" % ScalaTestVersion
)
)
.dependsOn(common)
lazy val http4s = project
.in(file("http4s-lambda"))
.settings(publishSettings)
.enablePlugins(LibraryProjectPlugin)
.settings(commonSettings)
.settings(
name := "http4s-lambda",
moduleName := "http4s-lambda",
scalacOptions ++= scalacVersionOptions(scalaVersion.value),
libraryDependencies ++= {
Seq(
"org.http4s" %% "http4s-core" % Http4sVersion,
"org.scalatest" %% "scalatest" % ScalaTestVersion % "test",
"org.http4s" %% "http4s-dsl" % Http4sVersion % "test",
"org.http4s" %% "http4s-circe" % Http4sVersion % "test"
)
}
)
.dependsOn(common)
.dependsOn(tests % "test")
lazy val exampleHttp4s = project
.in(file("example-http4s"))
.settings(noPublishSettings)
.settings(commonSettings)
.settings(
moduleName := "example-http4s",
assemblyJarName in assembly := "example-http4s.jar",
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-dsl" % Http4sVersion
)
)
.dependsOn(http4s)
lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val publishSettings = Seq(
homepage := Some(url("https://github.com/howardjohn/scala-server-lambda")),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(
ScmInfo(
url("https://github.com/howardjohn/scala-server-lambda"),
"scm:git@github.com:howardjohn/scala-server-lambda.git"
)),
developers := List(
Developer(
id = "howardjohn",
name = "John Howard",
email = "johnbhoward96@gmail.com",
url = url("https://github.com/howardjohn/")
)
)
)