-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
96 lines (85 loc) · 2.21 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
import Dependencies._
import Dependencies.{ IO => io }
ThisBuild / organization := "com.github"
ThisBuild / scalaVersion := "3.2.0"
ThisBuild / scalacOptions ++=
Seq(
"-deprecation",
"-rewrite",
"-indent",
"-explain",
"-feature",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Yexplicit-nulls", // experimental (I've seen it cause issues with circe)
"-Ykind-projector",
"-Ysafe-init", // experimental (I've seen it cause issues with circe)
) /* ++ Seq("-rewrite", "-indent") ++ Seq("-source", "future-migration") */
lazy val app =
project
.in(file("."))
.settings(name := "app")
.settings(publish := {}, publish / skip := true)
.aggregate(zioServer, zioConfig)
lazy val zioServer =
project
.settings(name := "zioServer")
.settings(commonSettings)
.settings(commonDependencies)
.settings(serverDependencies)
lazy val zioConfig =
project
.settings(name := "zioConfig")
.settings(commonSettings)
.settings(commonDependencies)
.settings(configDependencies)
/*
* Project Dependencies
*/
lazy val serverDependencies =
libraryDependencies ++= Seq(
dev.zio.`zio-json`,
io.d11.zhttp,
)
lazy val configDependencies =
libraryDependencies ++= Seq(
dev.zio.`zio-config`,
dev.zio.`zio-config-magnolia`,
dev.zio.`zio-config-typesafe`,
)
lazy val commonDependencies = Seq(
libraryDependencies ++= Seq(
// main dependencies
dev.zio.zio,
// io.getquill.`quill-zio`,
// io.getquill.`quill-jdbc-zio`,
// com.h2database.h2,
ch.`qos.logback`.`logback-classic`,
org.slf4j.`slf4j-api`,
),
libraryDependencies ++= Seq(
org.scalatest.scalatest,
org.scalatestplus.`scalacheck-1-16`,
).map(_ % Test),
)
/*
* Project Settings
*/
lazy val commonSettings = {
lazy val commonScalacOptions = Seq(
Compile / console / scalacOptions --= Seq(
"-Wunused:_",
"-Xfatal-warnings",
),
Test / console / scalacOptions :=
(Compile / console / scalacOptions).value,
)
lazy val otherCommonSettings = Seq(
update / evictionWarningOptions := EvictionWarningOptions.empty
)
Seq(
commonScalacOptions,
otherCommonSettings,
).reduceLeft(_ ++ _)
}