Repository navigation
Expand file tree
/
Copy pathbuild.sbt
More file actions
92 lines (83 loc) · 3.56 KB
/
Copy pathbuild.sbt
File metadata and controls
92 lines (83 loc) · 3.56 KB
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
/* =========================================================================================
* Copyright © 2013-2019 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 kamonVersion = "2.7.2"
val kamonCore = "io.kamon" %% "kamon-core" % kamonVersion
val kamonTestkit = "io.kamon" %% "kamon-testkit" % kamonVersion
val kamonCommon = "io.kamon" %% "kamon-instrumentation-common" % kamonVersion
// copy pasted from https://github.com/kamon-io/kamon-sbt-umbrella
val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.2.3"
val scalatest = "org.scalatest" %% "scalatest" % "3.2.18"
def compileScope(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "compile")
def testScope(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "test")
// end copy pasted section
def http4sDeps(version: String) = Seq(
"org.http4s" %% "http4s-client" % version % Provided,
"org.http4s" %% "http4s-server" % version % Provided,
"org.http4s" %% "http4s-ember-client" % version % Test,
"org.http4s" %% "http4s-ember-server" % version % Test,
"org.http4s" %% "http4s-dsl" % version % Test
)
lazy val shared = Seq(
scalaVersion := "2.13.13",
moduleName := name.value,
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := "central.sonatype.com",
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) => Seq("-Ypartial-unification", "-language:higherKinds")
case _ => "-language:higherKinds" :: Nil
}),
scalacOptions ~= { options =>
options.filter(_ match {
case "-Ywarn-dead-code" | "-Xlint" => false
case _ => true
})
},
libraryDependencies ++=
compileScope(kamonCore, kamonCommon) ++
testScope(scalatest, kamonTestkit, logbackClassic),
Test / parallelExecution := false,
scmInfo := Some(
ScmInfo(url("https://github.com/codacy/kamon-http4s"), "scm:git@github.com:codacy/kamon-http4s.git")
),
// this setting is not picked up properly from the plugin
pgpPassphrase := Option(System.getenv("SONATYPE_GPG_PASSPHRASE")).map(_.toCharArray)
) ++ privateMvnPublish
lazy val `kamon-http4s-0_23` = project
.in(file("modules/0.23"))
.settings(
shared,
crossScalaVersions := Seq("2.12.20", "2.13.13", "3.3.3"),
name := "kamon-http4s-0.23",
libraryDependencies ++= http4sDeps("0.23.18")
)
lazy val `kamon-http4s-1_0` = project
.in(file("modules/1.0"))
.settings(
shared,
crossScalaVersions := Seq("2.13.13"),
name := "kamon-http4s-1.0",
libraryDependencies ++= http4sDeps("1.0.0-M38")
)
lazy val root = project
.in(file("."))
.settings(
shared,
name := "kamon-http4s",
publish / skip := true,
Test / parallelExecution := false,
Global / concurrentRestrictions += Tags.limit(Tags.Test, 1),
pgpPassphrase := Option(System.getenv("SONATYPE_GPG_PASSPHRASE")).map(_.toCharArray)
)
.aggregate(`kamon-http4s-0_23`, `kamon-http4s-1_0`)