1
+ import com .here .bom .Bom
1
2
import ReleaseTransformations ._
2
3
import xerial .sbt .Sonatype .sonatypeSettings
3
4
import xerial .sbt .Sonatype .sonatypeCentralHost
@@ -42,9 +43,11 @@ scalaVersion := scala213
42
43
val cucumberVersion = " 7.28.0"
43
44
val jacksonVersion = " 2.20.0"
44
45
val mockitoScalaVersion = " 1.17.45"
45
- val junitVersion = " 4.13.2"
46
- val junitJupiterVersion = " 5.13.4"
47
- val junitPlatformVersion = " 1.13.4"
46
+ val junit4Version = " 4.13.2"
47
+
48
+ // BOMs
49
+
50
+ lazy val junitBom = Bom (" org.junit" % " junit-bom" % " 5.13.4" )
48
51
49
52
// Projects and settings
50
53
@@ -56,7 +59,11 @@ lazy val commonSettings = Seq(
56
59
case Some ((3 , _)) => ScalacOptions .scalacOptions3
57
60
case _ => Seq ()
58
61
}
59
- }
62
+ },
63
+ // Load BOMs
64
+ junitBom,
65
+ // Add all dependencies of the BOM in dependencyOverrides
66
+ dependencyOverrides ++= junitBom.key.value.bomDependencies
60
67
)
61
68
62
69
lazy val junit4SbtSupport = Seq (
@@ -90,7 +97,7 @@ lazy val cucumberScala = (projectMatrix in file("cucumber-scala"))
90
97
" io.cucumber" % " cucumber-core" % cucumberVersion,
91
98
// Users have to provide it (for JacksonDefaultDataTableTransformer)
92
99
" com.fasterxml.jackson.module" %% " jackson-module-scala" % jacksonVersion % Provided ,
93
- " org.junit.jupiter" % " junit-jupiter" % junitJupiterVersion % Test ,
100
+ " org.junit.jupiter" % " junit-jupiter" % junitBom.key.value % Test ,
94
101
(" org.mockito" %% " mockito-scala" % mockitoScalaVersion % Test )
95
102
.cross(CrossVersion .for3Use2_13)
96
103
),
@@ -141,8 +148,7 @@ lazy val integrationTestsCommon =
141
148
.settings(
142
149
name := " integration-tests-common" ,
143
150
libraryDependencies ++= Seq (
144
- " org.junit.jupiter" % " junit-jupiter" % junitJupiterVersion % Test ,
145
- " org.junit.platform" % " junit-platform-suite" % junitPlatformVersion % Test ,
151
+ " org.junit.platform" % " junit-platform-suite" % junitBom.key.value % Test ,
146
152
" io.cucumber" % " cucumber-junit-platform-engine" % cucumberVersion % Test
147
153
),
148
154
publishArtifact := false
@@ -157,8 +163,7 @@ lazy val integrationTestsJackson =
157
163
.settings(
158
164
name := " integration-tests-jackson" ,
159
165
libraryDependencies ++= Seq (
160
- " org.junit.jupiter" % " junit-jupiter" % junitJupiterVersion % Test ,
161
- " org.junit.platform" % " junit-platform-suite" % junitPlatformVersion % Test ,
166
+ " org.junit.platform" % " junit-platform-suite" % junitBom.key.value % Test ,
162
167
" io.cucumber" % " cucumber-junit-platform-engine" % cucumberVersion % Test ,
163
168
" com.fasterxml.jackson.module" %% " jackson-module-scala" % jacksonVersion % Test
164
169
),
@@ -174,8 +179,7 @@ lazy val integrationTestsPicoContainer =
174
179
.settings(
175
180
name := " integration-tests-picocontainer" ,
176
181
libraryDependencies ++= Seq (
177
- " org.junit.jupiter" % " junit-jupiter" % junitJupiterVersion % Test ,
178
- " org.junit.platform" % " junit-platform-suite" % junitPlatformVersion % Test ,
182
+ " org.junit.platform" % " junit-platform-suite" % junitBom.key.value % Test ,
179
183
" io.cucumber" % " cucumber-junit-platform-engine" % cucumberVersion % Test ,
180
184
" io.cucumber" % " cucumber-picocontainer" % cucumberVersion % Test
181
185
),
@@ -192,7 +196,7 @@ lazy val examplesJunit4 = (projectMatrix in file("examples/examples-junit4"))
192
196
name := " scala-examples" ,
193
197
libraryDependencies ++= Seq (
194
198
" io.cucumber" % " cucumber-junit" % cucumberVersion % Test ,
195
- " junit" % " junit" % junitVersion % Test
199
+ " junit" % " junit" % junit4Version % Test
196
200
),
197
201
publishArtifact := false
198
202
)
@@ -206,8 +210,7 @@ lazy val examplesJunit5 = (projectMatrix in file("examples/examples-junit5"))
206
210
name := " scala-examples" ,
207
211
libraryDependencies ++= Seq (
208
212
" io.cucumber" % " cucumber-junit-platform-engine" % cucumberVersion % Test ,
209
- " org.junit.jupiter" % " junit-jupiter" % junitJupiterVersion % Test ,
210
- " org.junit.platform" % " junit-platform-suite" % junitPlatformVersion % Test
213
+ " org.junit.platform" % " junit-platform-suite" % junitBom.key.value % Test
211
214
),
212
215
publishArtifact := false
213
216
)
0 commit comments