Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.here.bom.Bom
import ReleaseTransformations._
import xerial.sbt.Sonatype.sonatypeSettings
import xerial.sbt.Sonatype.sonatypeCentralHost
Expand Down Expand Up @@ -42,9 +43,11 @@ scalaVersion := scala213
val cucumberVersion = "7.28.0"
val jacksonVersion = "2.20.0"
val mockitoScalaVersion = "1.17.45"
val junitVersion = "4.13.2"
val junitJupiterVersion = "5.13.4"
val junitPlatformVersion = "1.13.4"
val junit4Version = "4.13.2"

// BOMs

lazy val junitBom = Bom("org.junit" % "junit-bom" % "5.13.4")

// Projects and settings

Expand All @@ -56,7 +59,11 @@ lazy val commonSettings = Seq(
case Some((3, _)) => ScalacOptions.scalacOptions3
case _ => Seq()
}
}
},
// Load BOMs
junitBom,
// Add all dependencies of the BOM in dependencyOverrides
dependencyOverrides ++= junitBom.key.value.bomDependencies
)

lazy val junit4SbtSupport = Seq(
Expand Down Expand Up @@ -90,7 +97,7 @@ lazy val cucumberScala = (projectMatrix in file("cucumber-scala"))
"io.cucumber" % "cucumber-core" % cucumberVersion,
// Users have to provide it (for JacksonDefaultDataTableTransformer)
"com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion % Provided,
"org.junit.jupiter" % "junit-jupiter" % junitJupiterVersion % Test,
"org.junit.jupiter" % "junit-jupiter" % junitBom.key.value % Test,
("org.mockito" %% "mockito-scala" % mockitoScalaVersion % Test)
.cross(CrossVersion.for3Use2_13)
),
Expand Down Expand Up @@ -141,8 +148,7 @@ lazy val integrationTestsCommon =
.settings(
name := "integration-tests-common",
libraryDependencies ++= Seq(
"org.junit.jupiter" % "junit-jupiter" % junitJupiterVersion % Test,
"org.junit.platform" % "junit-platform-suite" % junitPlatformVersion % Test,
"org.junit.platform" % "junit-platform-suite" % junitBom.key.value % Test,
"io.cucumber" % "cucumber-junit-platform-engine" % cucumberVersion % Test
),
publishArtifact := false
Expand All @@ -157,8 +163,7 @@ lazy val integrationTestsJackson =
.settings(
name := "integration-tests-jackson",
libraryDependencies ++= Seq(
"org.junit.jupiter" % "junit-jupiter" % junitJupiterVersion % Test,
"org.junit.platform" % "junit-platform-suite" % junitPlatformVersion % Test,
"org.junit.platform" % "junit-platform-suite" % junitBom.key.value % Test,
"io.cucumber" % "cucumber-junit-platform-engine" % cucumberVersion % Test,
"com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion % Test
),
Expand All @@ -174,8 +179,7 @@ lazy val integrationTestsPicoContainer =
.settings(
name := "integration-tests-picocontainer",
libraryDependencies ++= Seq(
"org.junit.jupiter" % "junit-jupiter" % junitJupiterVersion % Test,
"org.junit.platform" % "junit-platform-suite" % junitPlatformVersion % Test,
"org.junit.platform" % "junit-platform-suite" % junitBom.key.value % Test,
"io.cucumber" % "cucumber-junit-platform-engine" % cucumberVersion % Test,
"io.cucumber" % "cucumber-picocontainer" % cucumberVersion % Test
),
Expand All @@ -192,7 +196,7 @@ lazy val examplesJunit4 = (projectMatrix in file("examples/examples-junit4"))
name := "scala-examples",
libraryDependencies ++= Seq(
"io.cucumber" % "cucumber-junit" % cucumberVersion % Test,
"junit" % "junit" % junitVersion % Test
"junit" % "junit" % junit4Version % Test
),
publishArtifact := false
)
Expand All @@ -206,8 +210,7 @@ lazy val examplesJunit5 = (projectMatrix in file("examples/examples-junit5"))
name := "scala-examples",
libraryDependencies ++= Seq(
"io.cucumber" % "cucumber-junit-platform-engine" % cucumberVersion % Test,
"org.junit.jupiter" % "junit-jupiter" % junitJupiterVersion % Test,
"org.junit.platform" % "junit-platform-suite" % junitPlatformVersion % Test
"org.junit.platform" % "junit-platform-suite" % junitBom.key.value % Test
),
publishArtifact := false
)
Expand Down
3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")

// Junit 5
addSbtPlugin("com.github.sbt.junit" % "sbt-jupiter-interface" % "0.15.1")

// Usage of BOMs
addSbtPlugin("com.here.platform" % "sbt-bom" % "1.0.27")
Loading