forked from typelevel/natchez
/
build.sbt
179 lines (163 loc) · 5.88 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
lazy val scala211Version = "2.11.12"
lazy val scala212Version = "2.12.10"
lazy val scala213Version = "2.13.0"
// Global Settings
lazy val commonSettings = Seq(
// Publishing
organization := "org.tpolecat",
licenses ++= Seq(("MIT", url("http://opensource.org/licenses/MIT"))),
homepage := Some(url("https://github.com/tpolecat/natchez")),
developers := List(
Developer("tpolecat", "Rob Norris", "rob_norris@mac.com", url("http://www.tpolecat.org"))
),
// Headers
headerMappings := headerMappings.value + (HeaderFileType.scala -> HeaderCommentStyle.cppStyleLineComment),
headerLicense := Some(HeaderLicense.Custom(
"""|Copyright (c) 2019 by Rob Norris
|This software is licensed under the MIT License (MIT).
|For more information see LICENSE or https://opensource.org/licenses/MIT
|""".stripMargin
)
),
// Compilation
scalaVersion := scala212Version,
crossScalaVersions := Seq(scala211Version, scala212Version, scala213Version),
Compile / console / scalacOptions --= Seq("-Xfatal-warnings", "-Ywarn-unused:imports"),
Compile / doc / scalacOptions --= Seq("-Xfatal-warnings"),
Compile / doc / scalacOptions ++= Seq(
"-groups",
"-sourcepath", (baseDirectory in LocalRootProject).value.getAbsolutePath,
"-doc-source-url", "https://github.com/tpolecat/natchez/blob/v" + version.value + "€{FILE_PATH}.scala"
),
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3"),
// Blah
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)
lazy val natchez = project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
crossScalaVersions := Nil,
publish / skip := true
)
.dependsOn(core, jaeger, honeycomb, opencensus, lightstep, lightstepGrpc, lightstepHttp, examples)
.aggregate(core, jaeger, honeycomb, opencensus, lightstep, lightstepGrpc, lightstepHttp, examples)
lazy val core = project
.in(file("modules/core"))
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-core",
description := "Tagless, non-blocking OpenTracing implementation for Scala.",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "2.0.0",
"org.typelevel" %% "cats-effect" % "2.0.0"
)
)
lazy val jaeger = project
.in(file("modules/jaeger"))
.dependsOn(core)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-jaeger",
description := "Jaeger support for Natchez.",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.3",
"io.jaegertracing" % "jaeger-client" % "1.1.0",
"org.slf4j" % "slf4j-jdk14" % "1.7.30"
)
)
lazy val honeycomb = project
.in(file("modules/honeycomb"))
.dependsOn(core)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-honeycomb",
description := "Honeycomb support for Natchez.",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.3",
"io.honeycomb.libhoney" % "libhoney-java" % "1.1.0"
)
)
lazy val opencensus = project
.in(file("modules/opencensus"))
.dependsOn(core)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-opencensus",
description := "Opencensus support for Natchez.",
libraryDependencies ++= Seq(
"io.opencensus" % "opencensus-exporter-trace-ocagent" % "0.24.0"
)
)
lazy val lightstep = project
.in(file("modules/lightstep"))
.dependsOn(core)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-lightstep",
description := "Lightstep support for Natchez.",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.3",
"com.lightstep.tracer" % "lightstep-tracer-jre" % "0.18.3"
)
)
lazy val lightstepGrpc = project
.in(file("modules/lightstep-grpc"))
.dependsOn(lightstep)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-lightstep-grpc",
description := "Lightstep gRPC bindings for Natchez.",
libraryDependencies ++= Seq(
"com.lightstep.tracer" % "tracer-grpc" % "0.19.2",
"io.grpc" % "grpc-netty" % "1.26.0",
"io.netty" % "netty-tcnative-boringssl-static" % "2.0.28.Final"
)
)
lazy val lightstepHttp = project
.in(file("modules/lightstep-http"))
.dependsOn(lightstep)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-lightstep-http",
description := "Lightstep HTTP bindings for Natchez.",
libraryDependencies ++= Seq(
"com.lightstep.tracer" % "tracer-okhttp" % "0.19.2"
)
)
lazy val log = project
.in(file("modules/log"))
.dependsOn(core)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "natchez-log",
description := "Logging bindings for Natchez.",
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % "0.11.1",
"io.chrisdavenport" %% "log4cats-core" % "1.0.0",
)
)
lazy val examples = project
.in(file("modules/examples"))
.dependsOn(core, jaeger, honeycomb, lightstepHttp, log)
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
publish / skip := true,
name := "natchez-examples",
description := "Example programs for Natchez.",
crossScalaVersions --= List(scala211Version, scala213Version), // until skunk is out for 2.13
libraryDependencies ++= Seq(
"io.chrisdavenport" %% "log4cats-slf4j" % "1.0.1",
)
)