Skip to content

Commit 69e4f21

Browse files
committed
Use JUnit 5 Maven BOM in Gradle build
Issue: SPR-17129
1 parent 109a2b4 commit 69e4f21

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ ext {
3434
hsqldbVersion = "2.4.1"
3535
jackson2Version = "2.9.6"
3636
jettyVersion = "9.4.12.RC1"
37-
junitPlatformVersion = "1.3.0-RC1"
38-
junitJupiterVersion = "5.3.0-RC1"
39-
junitVintageVersion = "5.3.0-RC1"
37+
junit5Version = '5.3.0-RC1'
4038
kotlinVersion = "1.2.60"
4139
log4jVersion = "2.11.1"
4240
nettyVersion = "4.1.28.Final"
@@ -154,7 +152,7 @@ configure(allprojects) { project ->
154152
}
155153

156154
dependencies {
157-
testCompile("junit:junit:4.12") {
155+
testCompile('junit:junit:4.12') {
158156
exclude group:'org.hamcrest', module:'hamcrest-core'
159157
}
160158
testCompile("org.mockito:mockito-core:2.21.0") {

spring-test/spring-test.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ description = "Spring TestContext Framework"
22

33
dependencyManagement {
44
imports {
5+
mavenBom "org.junit:junit-bom:${junit5Version}"
56
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
67
mavenBom "io.netty:netty-bom:${nettyVersion}"
78
}
@@ -27,8 +28,8 @@ dependencies {
2728
optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
2829
optional("javax.xml.bind:jaxb-api:2.3.0")
2930
optional("javax.websocket:javax.websocket-api:1.1")
30-
optional("junit:junit:4.12")
31-
optional("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
31+
optional('junit:junit:4.12')
32+
optional('org.junit.jupiter:junit-jupiter-api')
3233
optional("org.testng:testng:6.14.3")
3334
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
3435
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
@@ -62,8 +63,8 @@ dependencies {
6263
testCompile("org.hibernate:hibernate-core:5.2.17.Final")
6364
testCompile("org.hibernate:hibernate-validator:6.0.12.Final")
6465
// Enable use of the JUnit Platform Runner
65-
testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
66-
testCompile("org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}")
66+
testCompile('org.junit.platform:junit-platform-runner')
67+
testCompile('org.junit.jupiter:junit-jupiter-params')
6768
testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
6869
testCompile("com.thoughtworks.xstream:xstream:1.4.10")
6970
testCompile("com.rometools:rome:1.11.0")
@@ -78,9 +79,9 @@ dependencies {
7879
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
7980
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
8081
// so that we can run JUnit 4 tests in IntelliJ IDEA.
81-
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
82-
testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
83-
testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
82+
testRuntime('org.junit.jupiter:junit-jupiter-engine')
83+
testRuntime('org.junit.platform:junit-platform-launcher')
84+
testRuntime('org.junit.vintage:junit-vintage-engine')
8485
testRuntime("org.glassfish:javax.el:3.0.1-b08")
8586
testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1")
8687
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")

0 commit comments

Comments
 (0)