Add JUnit Vintage Engine dependency to allow Gradle to run both JUnit 4 and 5 tests.

This commit is contained in:
Isira Seneviratne 2020-04-24 18:25:31 +05:30
parent 005627b117
commit 57954dde34
1 changed files with 6 additions and 0 deletions

View File

@ -85,6 +85,11 @@ android {
exclude 'LICENSE-EDL-1.0.txt'
}
testOptions {
unitTests.all {
useJUnitPlatform()
}
}
tasks.withType(Test) {
testLogging {
events "passed", "skipped", "failed"
@ -112,6 +117,7 @@ dependencies {
testImplementation "org.powermock:powermock-module-junit4:$powermock_version"
testImplementation "org.powermock:powermock-api-mockito2:$powermock_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5_version"
}
repositories {
mavenCentral()