-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
118 lines (106 loc) · 5.26 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
/* =========================================================================================
* Copyright © 2013-2020 the kamon project <http://kamon.io/>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
* =========================================================================================
*/
val jettyV9Version = "9.4.25.v20191220"
val jettyV7Version = "7.6.21.v20160908"
val kamonCore = "io.kamon" %% "kamon-core" % "2.0.4"
val kamonTestkit = "io.kamon" %% "kamon-testkit" % "2.0.4"
val kamonCommon = "io.kamon" %% "kamon-instrumentation-common" % "2.0.1"
val servletApiV25 = "javax.servlet" % "servlet-api" % "2.5"
val servletApiV3 = "javax.servlet" % "javax.servlet-api" % "3.1.0"
val jettyServerV9 = "org.eclipse.jetty" % "jetty-server" % jettyV9Version
val jettyServletV9 = "org.eclipse.jetty" % "jetty-servlet" % jettyV9Version
val jettyServletsV9 = "org.eclipse.jetty" % "jetty-servlets" % jettyV9Version
val jettyServerV7 = "org.eclipse.jetty" % "jetty-server" % jettyV7Version
val jettyServletV7 = "org.eclipse.jetty" % "jetty-servlet" % jettyV7Version
val jettyServletsV7 = "org.eclipse.jetty" % "jetty-servlets" % jettyV7Version
val httpClient = "org.apache.httpcomponents" % "httpclient" % "4.5.5"
val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.0.13"
val scalatest = "org.scalatest" %% "scalatest" % "3.1.0"
lazy val root = (project in file("."))
.settings(noPublishing: _*)
.aggregate(kamonServlet, kamonServlet25, kamonServlet3, kamonServletBench25, kamonServletBench3)
val commonSettings = Seq(
scalaVersion := "2.13.1",
resolvers += Resolver.mavenLocal,
crossScalaVersions := Seq("2.11.12", "2.12.10", "2.13.1"),
scalacOptions ++= Seq(
"-language:higherKinds",
"-language:postfixOps") ++ (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2,11)) => Seq("-Ybackend:GenBCode","-Ydelambdafy:method","-target:jvm-1.8")
case Some((2,12)) => Seq("-opt:l:method")
case _ => Seq.empty
})
)
lazy val kamonServlet = Project("kamon-servlet", file("kamon-servlet"))
.settings(Seq(
bintrayPackage := "kamon-servlet",
moduleName := "kamon-servlet",
resolvers += Resolver.bintrayRepo("kamon-io", "snapshots")))
.settings(parallelExecution in Test := false)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++=
compileScope(kamonCore, kamonCommon) ++
testScope(scalatest, kamonTestkit, logbackClassic))
lazy val kamonServlet25 = Project("kamon-servlet-25", file("kamon-servlet-2.5"))
.settings(Seq(
bintrayPackage := "kamon-servlet",
moduleName := "kamon-servlet-2.5",
resolvers += Resolver.bintrayRepo("kamon-io", "snapshots")))
.settings(parallelExecution in Test := false)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++=
compileScope(kamonCore, kamonCommon) ++
providedScope(servletApiV25) ++
testScope(scalatest, kamonTestkit, logbackClassic, jettyServletsV7, jettyServerV7, jettyServletV7, httpClient))
.dependsOn(kamonServlet)
lazy val kamonServlet3 = Project("kamon-servlet-3", file("kamon-servlet-3.x.x"))
.settings(Seq(
bintrayPackage := "kamon-servlet",
moduleName := "kamon-servlet-3",
resolvers += Resolver.bintrayRepo("kamon-io", "snapshots")))
.settings(parallelExecution in Test := false)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++=
compileScope(kamonCore, kamonCommon) ++
providedScope(servletApiV3) ++
testScope(scalatest, kamonTestkit, logbackClassic, jettyServletsV9, jettyServerV9, jettyServletV9, httpClient))
.dependsOn(kamonServlet)
lazy val kamonServletBench25 = Project("benchmarks-25", file("kamon-servlet-bench-2.5"))
.enablePlugins(JmhPlugin)
.settings(commonSettings: _*)
.settings(
moduleName := "kamon-servlet-bench-2.5",
fork in Test := true)
.settings(noPublishing: _*)
.settings(
libraryDependencies ++=
compileScope(jettyServletsV7, jettyServerV7, jettyServletV7, httpClient) ++
providedScope(servletApiV25))
.dependsOn(kamonServlet25)
lazy val kamonServletBench3 = Project("benchmarks-3", file("kamon-servlet-bench-3.x.x"))
.enablePlugins(JmhPlugin)
.settings(commonSettings: _*)
.settings(
moduleName := "kamon-servlet-bench-3",
fork in Test := true)
.settings(noPublishing: _*)
.settings(
libraryDependencies ++=
compileScope(jettyServletsV9, jettyServerV9, jettyServletV9, httpClient) ++
providedScope(servletApiV3))
.dependsOn(kamonServlet3)