From 21bcb5429a02a6a656502250ced3e5b8c40d21dc Mon Sep 17 00:00:00 2001 From: Yahor Berdnikau Date: Sat, 6 Oct 2018 14:54:28 +0200 Subject: [PATCH] Use JUnit5 engine to run unit tests in android modules. --- core/subsonic-api-image-loader/build.gradle | 1 - gradle_scripts/android-module-bootstrap.gradle | 7 +++++++ ultrasonic/build.gradle | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/subsonic-api-image-loader/build.gradle b/core/subsonic-api-image-loader/build.gradle index 20063309..40c63863 100644 --- a/core/subsonic-api-image-loader/build.gradle +++ b/core/subsonic-api-image-loader/build.gradle @@ -13,7 +13,6 @@ dependencies { exclude group: "com.android.support" } - testImplementation testing.junit testImplementation testing.kotlinJunit testImplementation testing.mockito testImplementation testing.mockitoInline diff --git a/gradle_scripts/android-module-bootstrap.gradle b/gradle_scripts/android-module-bootstrap.gradle index 7e2501b0..0b10209a 100644 --- a/gradle_scripts/android-module-bootstrap.gradle +++ b/gradle_scripts/android-module-bootstrap.gradle @@ -49,8 +49,15 @@ android { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 +tasks.withType(Test) { + useJUnitPlatform() +} + dependencies { api other.kotlinStdlib + + testImplementation testing.junit + testRuntimeOnly testing.junitVintage } jacoco { diff --git a/ultrasonic/build.gradle b/ultrasonic/build.gradle index 98a4ed96..f5125ac1 100644 --- a/ultrasonic/build.gradle +++ b/ultrasonic/build.gradle @@ -49,6 +49,10 @@ android { } } +tasks.withType(Test) { + useJUnitPlatform() +} + dependencies { implementation project(':core:menudrawer') implementation project(':core:pulltorefresh') @@ -67,6 +71,7 @@ dependencies { testImplementation other.kotlinReflect testImplementation testing.junit + testRuntimeOnly testing.junitVintage testImplementation testing.kotlinJunit testImplementation testing.mockitoKotlin testImplementation testing.kluent