Skip to content

Commit 118a6d4

Browse files
committedMar 16, 2025
Use Mockito's BOM to ensure dependencies are aligned
1 parent cdbbff1 commit 118a6d4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎gradle/libs.versions.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ junit4Min = "4.12"
1515
ktlint = "1.5.0"
1616
log4j = "2.24.3"
1717
logback = "1.5.17"
18-
mockito = "5.16.1"
1918
opentest4j = "1.3.0"
2019
openTestReporting = "0.2.2"
2120
snapshotTests = "1.11.0"
@@ -55,8 +54,9 @@ log4j-jul = { module = "org.apache.logging.log4j:log4j-jul", version.ref = "log4
5554
maven = { module = "org.apache.maven:apache-maven", version = "3.9.9" }
5655
mavenSurefirePlugin = { module = "org.apache.maven.plugins:maven-surefire-plugin", version.ref = "surefire" }
5756
memoryfilesystem = { module = "com.github.marschall:memoryfilesystem", version = "2.8.1" }
58-
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
59-
mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }
57+
mockito-bom = { module = "org.mockito:mockito-bom", version = "5.16.1" }
58+
mockito-core = { module = "org.mockito:mockito-core" }
59+
mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter" }
6060
nohttp-checkstyle = { module = "io.spring.nohttp:nohttp-checkstyle", version = "0.0.11" }
6161
opentest4j = { module = "org.opentest4j:opentest4j", version.ref = "opentest4j" }
6262
openTestReporting-cli = { module = "org.opentest4j.reporting:open-test-reporting-cli", version.ref = "openTestReporting" }

‎gradle/plugins/common/src/main/kotlin/junitbuild.testing-conventions.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ tasks.withType<Test>().configureEach {
149149
}
150150

151151
dependencies {
152+
testImplementation(platform(dependencyFromLibs("mockito-bom")))
152153
testImplementation(dependencyFromLibs("assertj"))
153154
testImplementation(dependencyFromLibs("mockito-junit-jupiter"))
154155
testImplementation(dependencyFromLibs("testingAnnotations"))
@@ -169,6 +170,7 @@ dependencies {
169170
openTestReportingCli(dependencyFromLibs("openTestReporting-cli"))
170171
openTestReportingCli(project(":junit-platform-reporting"))
171172

173+
javaAgent(platform(dependencyFromLibs("mockito-bom")))
172174
javaAgent(dependencyFromLibs("mockito-core")) {
173175
isTransitive = false
174176
}

0 commit comments

Comments
 (0)