-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
129 lines (119 loc) · 5.07 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
import sbt.Tests.{Group, SubProcess}
import sbtrelease.ReleaseStateTransformations._
import xerial.sbt.Sonatype._
lazy val jUnitVersion = "5.7.0"
lazy val javaVersion = "1.9"
lazy val scala2_13_Version = "2.13.8"
lazy val scala3_Version = "3.1.2"
ThisBuild / scalaVersion := scala2_13_Version
lazy val settings = Seq(
crossScalaVersions := Seq(scala2_13_Version, scala3_Version),
publishTo := sonatypePublishToBundle.value,
pomIncludeRepository := { _ => false },
sonatypeCredentialHost := "s01.oss.sonatype.org",
publishMavenStyle := true,
licenses += ("MIT", url("https://opensource.org/licenses/MIT")),
organization := "com.sageserpent",
organizationName := "sageserpent",
description := "Generation of test data for parameterised testing",
sonatypeProjectHosting := Some(
GitHubHosting(
user = "sageserpent-open",
repository = "americium",
email = "gjmurphy1@icloud.com"
)
),
releaseCrossBuild := false, // Don't use the support for cross-building provided by `sbt-release`....
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
releaseStepCommandAndRemaining(
"+clean"
), // ... instead, cross-build the clean step using SBT's own mechanism ...
releaseStepCommandAndRemaining(
"+test"
), // ... and the testing step using SBT's own mechanism ...
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining(
"+publishSigned"
), // ... finally the publishing step using SBT's own mechanism.
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
),
name := "americium",
scalacOptions ++= (CrossVersion.partialVersion(
scalaVersion.value
) match {
case Some((2, _)) =>
Seq("-Xsource:3")
case Some((3, _)) =>
Seq.empty
case _ => Nil
}),
javacOptions ++= Seq("-source", javaVersion, "-target", javaVersion),
libraryDependencies ++= (CrossVersion.partialVersion(
scalaVersion.value
) match {
case Some((2, _)) =>
Seq(
"com.softwaremill.magnolia1_2" %% "magnolia" % "1.1.2",
"org.scala-lang" % "scala-reflect" % scalaVersion.value
)
case Some((3, _)) =>
Seq("com.softwaremill.magnolia1_3" %% "magnolia" % "1.1.1")
case _ => Seq.empty
}),
Test / testGrouping := {
val tests = (Test / definedTests).value
tests
.groupBy(_.name)
.map { case (groupName, group) =>
new Group(
groupName,
group,
SubProcess(
(Test / forkOptions).value.withRunJVMOptions(
Vector(
s"-Dtrials.runDatabase=trialsRunDatabaseForGroup$groupName"
)
)
)
)
}
.toSeq
},
Global / concurrentRestrictions := Seq(Tags.limit(Tags.ForkedTestGroup, 6)),
Test / fork := true,
Test / testForkedParallel := false,
libraryDependencies += "org.typelevel" %% "cats-core" % "2.7.0",
libraryDependencies += "org.typelevel" %% "cats-free" % "2.7.0",
libraryDependencies += "org.typelevel" %% "cats-collections-core" % "0.9.3",
libraryDependencies += "co.fs2" %% "fs2-core" % "3.2.5",
libraryDependencies += "io.circe" %% "circe-core" % "0.14.2",
libraryDependencies += "io.circe" %% "circe-generic" % "0.14.2",
libraryDependencies += "io.circe" %% "circe-parser" % "0.14.2",
libraryDependencies += "com.google.guava" % "guava" % "31.1-jre",
libraryDependencies += "com.oath.cyclops" % "cyclops" % "10.4.0",
libraryDependencies += "org.junit.jupiter" % "junit-jupiter-params" % "5.8.2",
libraryDependencies += "org.rocksdb" % "rocksdbjni" % "7.1.1",
libraryDependencies += "org.apache.commons" % "commons-text" % "1.10.0",
libraryDependencies += ("com.github.cb372" %% "scalacache-caffeine" % "0.28.0") cross CrossVersion.for3Use2_13,
libraryDependencies += "org.typelevel" %% "cats-laws" % "2.7.0" % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.9" % Test,
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.15.4" % Test,
libraryDependencies += "org.scalatestplus" %% "scalacheck-1-15" % "3.2.9.0" % Test,
libraryDependencies += "org.mockito" % "mockito-core" % "4.2.0" % Test,
libraryDependencies += "org.mockito" % "mockito-junit-jupiter" % "4.2.0" % Test,
libraryDependencies += "net.aichler" % "jupiter-interface" % JupiterKeys.jupiterVersion.value % Test,
libraryDependencies ++= Seq(
"org.junit.platform" % "junit-platform-runner" % "1.8.2" % Test,
"org.junit.jupiter" % "junit-jupiter-engine" % "5.8.2" % Test
),
libraryDependencies += "org.hamcrest" % "hamcrest" % "2.2" % Test,
libraryDependencies += "org.projectlombok" % "lombok" % "1.18.22" % Provided
)
lazy val americium = (project in file(".")).settings(settings: _*)