From 57954dde344c9b7ed1f99f5578dcc3618d25c5be Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Fri, 24 Apr 2020 18:25:31 +0530 Subject: [PATCH] Add JUnit Vintage Engine dependency to allow Gradle to run both JUnit 4 and 5 tests. --- android/BOINC/app/build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/BOINC/app/build.gradle b/android/BOINC/app/build.gradle index 48fbd0a220..e9c23a637a 100644 --- a/android/BOINC/app/build.gradle +++ b/android/BOINC/app/build.gradle @@ -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()