diff --git a/build.gradle b/build.gradle index f2f6bc0d31..4be38c7ed8 100644 --- a/build.gradle +++ b/build.gradle @@ -76,6 +76,9 @@ configure(allprojects) { project -> generatedPomCustomization { enabled = false } + imports { + mavenBom "org.junit:junit-bom:${junit5Version}" + } } configurations.all { @@ -134,6 +137,7 @@ configure(allprojects) { project -> systemProperty("java.awt.headless", "true") systemProperty("testGroups", project.properties.get("testGroups")) systemProperty("io.netty.leakDetection.level", "paranoid") + useJUnitPlatform() scanForTestClasses = false include(["**/*Tests.class", "**/*Test.class"]) // Since we set scanForTestClasses to false, we need to filter out inner @@ -165,6 +169,10 @@ configure(allprojects) { project -> testCompile("io.mockk:mockk:1.9.3") testCompile("org.hamcrest:hamcrest-all:1.3") testCompile("org.assertj:assertj-core:3.12.2") + // Pull in the latest JUnit 5 Launcher API and the Vintage engine as well + // so that we can run JUnit 4 tests in IDEs. + testRuntime("org.junit.platform:junit-platform-launcher") + testRuntime("org.junit.vintage:junit-vintage-engine") testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}") testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}") testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}") diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 58bcfefef7..096684bd8b 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -79,11 +79,7 @@ dependencies { } testCompile("io.projectreactor.netty:reactor-netty") testCompile("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1") - // Pull in the latest JUnit 5 Launcher API and the Vintage engine as well - // so that we can run JUnit 4 tests in IDEs. testRuntime("org.junit.jupiter:junit-jupiter-engine") - testRuntime("org.junit.platform:junit-platform-launcher") - testRuntime("org.junit.vintage:junit-vintage-engine") testRuntime("org.glassfish:javax.el:3.0.1-b08") testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1") testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")