-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
127 lines (113 loc) · 4.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
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
import sbt.Keys.thisProjectRef
ThisBuild / organization := "io.waylay"
ThisBuild / homepage := Some(url("https://waylay.io"))
ThisBuild / developers := List(
Developer(
"ramazanyich",
"Ramil Israfilov",
url("https://github.com/ramazanyich")
),
Developer("brunoballekens", "Bruno Ballekens", "[email protected]", url("https://github.com/brunoballekens"))
)
ThisBuild / licenses := List("MIT License" -> url("http://www.opensource.org/licenses/mit-license.php"))
val playWsVersion = "3.0.6"
val playJsonVersion = "3.0.4"
val specs2Version = "4.20.9"
val pekkoVersion = "1.0.3"
val testContainersVersion = "0.41.4"
val scalaTestVersion = "3.2.19"
val playVersion = "3.0.5" // test only
val scala2_13 = "2.13.15"
ThisBuild / scalaVersion := scala2_13
// we need both Test and IntegrationTest scopes for a correct pom, see https://github.com/sbt/sbt/issues/1380
val TestAndIntegrationTest = IntegrationTest.name + "," + Test.name
val exclusions = Seq(
"netty-codec",
"netty-handler-proxy",
"netty-handler",
"netty-transport-native-epoll",
"netty-codec-socks",
"netty-codec-http"
).map(name => ExclusionRule(organization = "io.netty", name = name))
lazy val root = (project in file("."))
.settings(
name := "kairosdb-scala",
Test / fork := true,
IntegrationTest / parallelExecution := false,
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.18.1",
"org.playframework" %% "play-json" % playJsonVersion,
"org.playframework" %% "play-ws-standalone" % playWsVersion,
"org.playframework" %% "play-ws-standalone-json" % playWsVersion,
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5",
"io.lemonlabs" %% "scala-uri" % "4.0.3",
// TEST
"org.specs2" %% "specs2-core" % specs2Version % Test,
"org.specs2" %% "specs2-junit" % specs2Version % Test,
"de.leanovate.play-mockws" %% "play-mockws-3-0" % "3.0.5" % Test,
"org.playframework" %% "play-ahc-ws" % playVersion % TestAndIntegrationTest, // neede for play-mockws
"org.playframework" %% "play-test" % playVersion % TestAndIntegrationTest, // play-mockws depends on some types in this dependency
"org.playframework" %% "play-ahc-ws-standalone" % playWsVersion % TestAndIntegrationTest,
"org.apache.pekko" %% "pekko-actor-typed" % pekkoVersion % TestAndIntegrationTest,
"org.apache.pekko" %% "pekko-serialization-jackson" % pekkoVersion % TestAndIntegrationTest,
"org.apache.pekko" %% "pekko-slf4j" % pekkoVersion % TestAndIntegrationTest,
// INTEGRATION TESTS
// TODO investigate if we can do this with specs2
"org.scalatest" %% "scalatest-wordspec" % scalaTestVersion % TestAndIntegrationTest,
"org.scalatest" %% "scalatest-mustmatchers" % scalaTestVersion % TestAndIntegrationTest,
"com.dimafeng" %% "testcontainers-scala-scalatest" % testContainersVersion % TestAndIntegrationTest
),
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-encoding",
"UTF-8", // yes, this is 2 args
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xlint",
"-Ywarn-dead-code"
)
)
.configs(IntegrationTest)
.settings(Defaults.itSettings: _*)
enablePlugins(GhpagesPlugin)
enablePlugins(SiteScaladocPlugin)
val publishScalaDoc = (ref: ProjectRef) =>
ReleaseStep(
action = releaseStepTaskAggregated(ref / ghpagesPushSite) // publish scaladoc
)
val runIntegrationTest = (ref: ProjectRef) =>
ReleaseStep(
action = releaseStepTaskAggregated(ref / IntegrationTest / test)
)
releaseProcess := {
import sbtrelease.ReleaseStateTransformations.*
Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
runIntegrationTest(thisProjectRef.value),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
publishScalaDoc(thisProjectRef.value),
setNextVersion,
commitNextVersion,
pushChanges
)
}
git.remoteRepo := "[email protected]:waylayio/kairosdb-scala.git"
lazy val examples = project
.dependsOn(root)
.settings(
libraryDependencies ++= Seq(
"org.playframework" %% "play-ahc-ws-standalone" % playWsVersion
)
)