This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
105 lines (97 loc) · 3.35 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
import sbtcompendium.models.IdlName
import sbtcompendium.ProtocolAndVersion
import sbtcompendium.models.proto.{GzipGen, MonixObservable, NoCompressionGen}
lazy val version = new {
val cats: String = "2.1.0"
val catseffect: String = "2.0.0"
val log4cats = "0.3.0"
val logbackClassic = "1.2.3"
val hammock: String = "0.10.0"
val pureConfig: String = "0.12.2"
val avroHugger: String = "1.0.0-RC22"
val kantan: String = "0.6.0"
val pbdirect: String = "0.4.1"
val fs2 = "1.0.0"
}
lazy val logSettings: Seq[Def.Setting[_]] = Seq(
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % version.logbackClassic,
"io.chrisdavenport" %% "log4cats-core" % version.log4cats,
"io.chrisdavenport" %% "log4cats-slf4j" % version.log4cats
)
)
lazy val configSettings = Seq(
libraryDependencies ++= Seq(
"com.github.pureconfig" %% "pureconfig" % version.pureConfig
)
)
lazy val catsSettings = Seq(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % version.cats,
"org.typelevel" %% "cats-effect" % version.catseffect
)
)
lazy val pluginExampleSettings = Seq(
libraryDependencies += "com.nrinaudo" %% "kantan.csv" % version.kantan
)
lazy val avroExample: Project = project
.in(file("avroExample"))
.settings(logSettings)
.settings(pluginExampleSettings)
.settings(catsSettings)
.settings(
compendiumSrcGenProtocolIdentifiers := List(ProtocolAndVersion("supplier",None),ProtocolAndVersion("material",None),ProtocolAndVersion("sale",None)),
compendiumSrcGenServerHost := "localhost",
compendiumSrcGenServerPort := 8080,
sourceGenerators in Compile += Def.task {
compendiumSrcGenClients.value
}.taskValue
)
.settings(
organization := "higherkindness",
name := "compendium-test",
scalaVersion := "2.12.10",
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-language:higherKinds",
"-language:postfixOps",
"-feature",
"-Ypartial-unification",
"-Xfatal-warnings",
)
)
lazy val protoExample: Project = project
.in(file("protoExample"))
.settings(logSettings)
.settings(pluginExampleSettings)
.settings(catsSettings)
.settings(libraryDependencies ++=Seq(
"com.47deg" %% "pbdirect" % version.pbdirect,
"co.fs2" %% "fs2-core" % version.fs2
))
.settings(
compendiumSrcGenProtocolIdentifiers := List(ProtocolAndVersion("shop",None)),
compendiumSrcGenServerHost := "localhost",
compendiumSrcGenServerPort := 8080,
compendiumSrcGenFormatSchema := IdlName.Protobuf,
compendiumSrcGenProtobufCompressionType := GzipGen,
compendiumSrcGenProtobufStreamingImpl:= MonixObservable,
sourceGenerators in Compile += Def.task {
compendiumSrcGenClients.value
}.taskValue
)
.settings(
organization := "higherkindness",
name := "compendium-test",
scalaVersion := "2.12.10",
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-language:higherKinds",
"-language:postfixOps",
"-feature",
"-Ypartial-unification",
"-Xfatal-warnings",
)
)