-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
149 lines (137 loc) · 4.93 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
Global / concurrentRestrictions += Tags.limit(Tags.Test, 2)
ThisBuild / libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
)
addCommandAlias(
"testCoverage",
"; clean ; coverage; test; coverageAggregate; coverageReport; coverageOff"
)
addCommandAlias(
"styleFix",
"; scalafmtSbt; scalafmtAll; headerCreateAll; scalafixAll"
)
addCommandAlias(
"styleCheck",
"; scalafmtCheckAll; headerCheckAll; scalafixAll --check"
)
Global / resolvers += "Akka library repository".at("https://repo.akka.io/maven")
lazy val root = project
.in(file("."))
.settings(basicSettings)
.settings(
publish / skip := true,
mimaFailOnNoPrevious := false,
Test / testOptions += Tests.Setup(() => EmbeddedDatabase.start())
)
.aggregate(core, pekko, akka, akkaBusl)
lazy val basicSettings = Seq(
organization := "net.nmoncho",
description := "Helenus is collection of Scala utilities for Apache Cassandra",
scalaVersion := Dependencies.Version.scala,
startYear := Some(2021),
homepage := Some(url("https://github.com/nMoncho/helenus")),
licenses := Seq("MIT License" -> new URL("http://opensource.org/licenses/MIT")),
headerLicense := Some(HeaderLicense.MIT("2021", "the original author or authors")),
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
developers := List(
Developer(
"nMoncho",
"Gustavo De Micheli",
"gustavo.demicheli@gmail.com",
url("https://github.com/nMoncho")
)
),
scalacOptions := (Opts.compile.encoding("UTF-8") :+
Opts.compile.deprecation :+
Opts.compile.unchecked :+
"-feature" :+
"-release" :+
"11" :+
"-Wunused:all" :+
"-Xcheck-macros" :+
"-language:higherKinds"),
(Test / testOptions) += Tests.Argument("-oF"),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
lazy val core = project
.settings(basicSettings)
.settings(
name := "helenus-core",
Test / testOptions += Tests.Setup(() => EmbeddedDatabase.start()),
libraryDependencies ++= Seq(
Dependencies.ossJavaDriver % Provided,
Dependencies.slf4j,
// Test Dependencies
Dependencies.mockito % Test,
Dependencies.scalaCheck % Test,
Dependencies.scalaTest % Test,
Dependencies.scalaTestPlus % Test,
Dependencies.logback % Test,
"net.java.dev.jna" % "jna" % "5.15.0" % Test // Fixes M1 JNA issue
)
)
lazy val docs = project
.in(file("helenus-docs"))
.enablePlugins(MdocPlugin)
.disablePlugins(ScoverageSbtPlugin)
.settings(basicSettings)
.settings(
publish / skip := true,
mdocVariables := Map(
"VERSION" -> version.value
),
mdocOut := file("."),
libraryDependencies ++= Seq(
Dependencies.ossJavaDriver,
Dependencies.cassandraUnit
)
)
.dependsOn(core)
lazy val akka = project
.settings(basicSettings)
.dependsOn(core % "compile->compile;test->test")
.settings(
name := "helenus-akka",
Test / testOptions += Tests.Setup(() => EmbeddedDatabase.start()),
// 5.x changed to business license
dependencyUpdatesFilter -= moduleFilter(organization = "com.lightbend.akka"),
// 2.7.x changed to business license
dependencyUpdatesFilter -= moduleFilter(organization = "com.typesafe.akka"),
libraryDependencies ++= Seq(
Dependencies.alpakka.cross(CrossVersion.for3Use2_13) % "provided,test",
Dependencies.akkaTestKit.cross(CrossVersion.for3Use2_13) % Test,
// Adding this until Alpakka aligns version with Akka TestKit
("com.typesafe.akka" %% "akka-stream" % Dependencies.Version.akka).cross(
CrossVersion.for3Use2_13
) % "provided,test"
)
)
lazy val akkaBusl = project
.in(file("akka-busl"))
.settings(basicSettings)
.dependsOn(core % "compile->compile;test->test")
.settings(
name := "helenus-akka-busl",
Test / testOptions += Tests.Setup(() => EmbeddedDatabase.start()),
libraryDependencies ++= Seq(
Dependencies.alpakkaBusl % "provided,test",
Dependencies.akkaTestKitBusl % Test,
// Adding this until Alpakka aligns version with Akka TestKit
"com.typesafe.akka" %% "akka-stream" % Dependencies.Version.akkaBusl % "provided,test"
)
)
lazy val pekko = project
.settings(basicSettings)
.dependsOn(core % "compile->compile;test->test")
.settings(
name := "helenus-pekko",
Test / testOptions += Tests.Setup(() => EmbeddedDatabase.start()),
libraryDependencies ++= Seq(
Dependencies.pekkoConnector % "provided,test",
Dependencies.pekkoTestKit % Test,
// Adding this until Alpakka aligns version with Pekko TestKit
"org.apache.pekko" %% "pekko-stream" % Dependencies.Version.pekkoTestKit % "provided,test"
)
)