-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
163 lines (144 loc) · 5.49 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
lazy val commonSettings = Seq(
organization := "com.fpinscala",
version := "0.1.0",
scalaVersion := "2.13.11"
)
lazy val compilerFlags = Seq(
"-Ymacro-annotations"
)
resolvers ++= Seq(
"Sonatype Releases".at("https://oss.sonatype.org/content/repositories/releases"),
"Akka Snapshot Repository".at("https://repo.akka.io/snapshots/")
)
resolvers ++= Resolver.sonatypeOssRepos("releases")
resolvers += MavenCache("local-maven", file("/Users/user/.ivy2/"))
ThisBuild / libraryDependencySchemes ++= Seq(
"io.circe" %% "circe-core" % VersionScheme.Always,
"io.circe" %% "circe-generic" % VersionScheme.Always // IDEA fails to import project.
)
val shapelessVersion = "2.3.10"
val monixVersion = "3.4.1"
val enumeratumVersion = "1.7.2"
val pureConfigVersion = "0.17.4"
val catsVersion = "2.9.0"
val catsEffectVersion = "3.5.1"
val kittensVersion = "2.3.2"
val scalaCheckVersion = "1.17.0"
val scalaTestVersion = "3.2.3"
val spireVerison = "0.18.0"
val log4catsVersion = "2.6.0"
val circeVersion = "0.14.5"
val circeDerivatioinVersion = "0.13.0-M5"
val supertaggedVersion = "1.5"
val monocleVersion = "3.2.0"
val zioVersion = "1.0.12"
val dtcVersion = "2.6.0"
val typesafeConfigVersion = "1.4.2"
val refinedVersion = "0.11.0"
val sttpVersion = "4.0.0-M6"
lazy val compilerSettings = Seq(
scalacOptions ++= compilerFlags
)
val catsEffectDeps = libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % catsEffectVersion,
"org.typelevel" %% "log4cats-slf4j" % log4catsVersion
)
lazy val commonDeps = libraryDependencies ++= Seq(
compilerPlugin(("org.typelevel" %% "kind-projector" % "0.13.2").cross(CrossVersion.full)),
"ru.pavkin" %% "dtc-core" % dtcVersion,
"com.chuusai" %% "shapeless" % shapelessVersion,
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.typesafe" % "config" % typesafeConfigVersion,
"ch.qos.logback" % "logback-classic" % "1.4.8",
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-derivation" % circeDerivatioinVersion,
"io.circe" %% "circe-generic-extras" % "0.14.3",
"io.circe" %% "circe-parser" % circeVersion,
"org.rudogma" %% "supertagged" % supertaggedVersion,
"org.typelevel" %% "spire" % spireVerison,
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "cats-kernel" % catsVersion,
"org.typelevel" %% "alleycats-core" % catsVersion,
"org.typelevel" %% "cats-free" % catsVersion,
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-streams" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test",
"org.typelevel" %% "kittens" % kittensVersion,
"com.github.pureconfig" %% "pureconfig" % pureConfigVersion,
"com.github.pureconfig" %% "pureconfig-enumeratum" % pureConfigVersion,
"com.beachape" %% "enumeratum" % enumeratumVersion,
"dev.optics" %% "monocle-core" % monocleVersion,
"dev.optics" %% "monocle-macro" % monocleVersion,
"eu.timepit" %% "refined" % refinedVersion,
"com.softwaremill.sttp.client4" %% "core" % sttpVersion,
"com.softwaremill.sttp.client4" %% "async-http-client-backend-cats" % sttpVersion,
"com.softwaremill.sttp.client4" %% "circe" % sttpVersion,
"io.minio" % "minio" % "8.5.8",
"ai.catboost" % "catboost-prediction" % "1.2.2",
"dev.optics" %% "monocle-law" % monocleVersion % "test",
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test",
"org.scalatest" %% "scalatest" % scalaTestVersion % "test"
)
lazy val common = (project in file("common"))
.settings(compilerSettings: _*)
.settings(commonSettings)
lazy val fpinscala = (project in file("fpinscala"))
.settings(compilerSettings: _*)
.settings(commonSettings)
.settings(commonDeps)
.settings(libraryDependencies ++= Seq("com.scylladb" % "java-driver-core" % "4.15.0.0"))
.dependsOn(common, macroo)
lazy val dockerApp = (project in file("docker-app"))
.enablePlugins(JavaAppPackaging)
.settings(dockerBaseImage := "openjdk:11")
// .settings {
// Universal / javaOptions ++= {
// val source = file(s"${sourceDirectory.value}/main/resources/app.jvmopts")
// if (source.exists()) Utils.readJavaOptions(source) else sys.error(s"Could not find $source")
// }
// }
.settings(compilerSettings: _*)
.settings(commonSettings)
.settings(commonDeps)
.dependsOn(common)
lazy val dependentTypes = (project in file("dependent-types"))
.settings(commonSettings)
.settings(libraryDependencies ++= Seq())
lazy val performance = (project in file("performance"))
.enablePlugins(JmhPlugin)
.settings(compilerSettings: _*)
.settings(commonSettings)
.settings(commonDeps)
.dependsOn(common)
lazy val fpinscalaRoot = (project in file("."))
.settings(commonSettings)
.aggregate(common, fpinscala)
lazy val macroo = (project in file("macro"))
.settings(commonSettings)
.settings(compilerSettings: _*)
.settings(commonDeps)
.dependsOn(common)
lazy val monix = (project in file("monix"))
.settings(commonSettings)
.settings(compilerSettings: _*)
.settings(commonDeps)
.dependsOn(common)
.settings(
libraryDependencies ++= Seq(
"io.monix" %% "monix-execution" % monixVersion,
"io.monix" %% "monix-eval" % monixVersion,
"io.monix" %% "monix" % monixVersion
)
)
lazy val catsEffect = (project in file("cats-effect"))
.settings(commonSettings)
.settings(compilerSettings: _*)
.settings(commonDeps)
.dependsOn(common)
.settings(catsEffectDeps)
addCommandAlias("c", ";compile")
addCommandAlias("r", ";reload")
addCommandAlias("rc", ";reload;compile")
logLevel := Level.Debug