-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
80 lines (73 loc) · 2.63 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
import Dependencies.*
lazy val scala2_13 = "2.13.14"
lazy val scala3 = "3.3.3"
lazy val supportedScalaVersions = List(scala2_13, scala3)
ThisBuild / scalaVersion := scala3
ThisBuild / crossScalaVersions := supportedScalaVersions
ThisBuild / organization := "dev.nomadblacky"
ThisBuild / homepage := Some(url("https://github.com/NomadBlacky/scalatest-otel-reporter"))
ThisBuild / licenses := List(License.MIT)
ThisBuild / developers := List(
Developer("nomadblacky", "Takumi Kadowaki", "[email protected]", url("https://github.com/NomadBlacky")),
)
// sbt-github-actions
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"), JavaSpec.temurin("11"))
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
RefPredicate.StartsWith(Ref.Tag("v")),
RefPredicate.Equals(Ref.Branch("main")),
)
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
commands = List("ci-release"),
name = Some("Publish project"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}",
),
),
)
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Sbt(
List("scalafmtSbtCheck", "scalafmtCheckAll", "Test/compile", "scalatest-otel-reporter/test"),
name = Some("Build project"),
),
)
lazy val root = (project in file("."))
.aggregate(`scalatest-otel-reporter`, `example-manual-configuration`)
.settings(
publish / skip := true,
)
lazy val `scalatest-otel-reporter` = (project in file("scalatest-otel-reporter"))
.settings(
libraryDependencies ++= Seq(
scalatestCore % Provided,
otelSdk % Provided,
scalatest % Test,
wiremock % Test,
otelExporterOTLP % Test,
otelSemConv % Test,
otelProto % Test,
logbackClassic % Test,
julToSlf4j % Test,
),
)
lazy val `example-manual-configuration` = (project in file("examples/manual-configuration"))
.dependsOn(`scalatest-otel-reporter`)
.settings(
publish / skip := true,
libraryDependencies ++= Seq(
scalatest % Test,
otelSdk % Test,
otelExporterOTLP % Test,
otelSemConv % Test,
),
Test / testOptions += Tests.Argument(
TestFrameworks.ScalaTest,
"-C",
"dev.nomadblacky.scalatest_otel_reporter.examples.JaegerTestReporter",
"-Dscalatest-otel-reporter.root-span-name=example-manual-configuration",
),
)