diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 838c9b10..b1c6ae25 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -19,10 +19,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/core-api/build.gradle.kts b/core-api/build.gradle.kts index 9913c2aa..0ebd99ad 100644 --- a/core-api/build.gradle.kts +++ b/core-api/build.gradle.kts @@ -25,10 +25,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 9166561e..206ad6be 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -25,10 +25,9 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) + val version: GitVersion by rootProject.extra buildConfigField("int", "VERSION_CODE", "${version.versionCode}") diff --git a/emarsys-e2e-test/build.gradle.kts b/emarsys-e2e-test/build.gradle.kts index a3bde3d3..7182a6cf 100644 --- a/emarsys-e2e-test/build.gradle.kts +++ b/emarsys-e2e-test/build.gradle.kts @@ -23,10 +23,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/emarsys-firebase/build.gradle.kts b/emarsys-firebase/build.gradle.kts index 2ea33f05..04aa81ed 100644 --- a/emarsys-firebase/build.gradle.kts +++ b/emarsys-firebase/build.gradle.kts @@ -25,10 +25,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/emarsys-huawei/build.gradle.kts b/emarsys-huawei/build.gradle.kts index c6fea274..42152171 100644 --- a/emarsys-huawei/build.gradle.kts +++ b/emarsys-huawei/build.gradle.kts @@ -26,10 +26,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/emarsys-huawei/src/androidTest/java/com/emarsys/service/EmarsysHuaweiMessagingServiceTest.kt b/emarsys-huawei/src/androidTest/java/com/emarsys/service/EmarsysHuaweiMessagingServiceTest.kt index c0a6b68f..337f1d54 100644 --- a/emarsys-huawei/src/androidTest/java/com/emarsys/service/EmarsysHuaweiMessagingServiceTest.kt +++ b/emarsys-huawei/src/androidTest/java/com/emarsys/service/EmarsysHuaweiMessagingServiceTest.kt @@ -27,7 +27,6 @@ import org.mockito.kotlin.verify class EmarsysHuaweiMessagingServiceTest { - private val application: Application get() = InstrumentationRegistry.getTargetContext().applicationContext as Application @@ -48,7 +47,9 @@ class EmarsysHuaweiMessagingServiceTest { "coreHandler", spyCoreHandler ) - Looper.prepare() + if (Looper.myLooper() == null) { + Looper.prepare() + } emarsysHuaweiMessagingService = EmarsysHuaweiMessagingService() } diff --git a/emarsys-sdk/build.gradle.kts b/emarsys-sdk/build.gradle.kts index cc70e838..59c15d51 100644 --- a/emarsys-sdk/build.gradle.kts +++ b/emarsys-sdk/build.gradle.kts @@ -29,10 +29,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/emarsys/build.gradle.kts b/emarsys/build.gradle.kts index 9e5f2b81..11d1e7f0 100644 --- a/emarsys/build.gradle.kts +++ b/emarsys/build.gradle.kts @@ -27,10 +27,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/mobile-engage-api/build.gradle.kts b/mobile-engage-api/build.gradle.kts index b42470a4..e094252d 100644 --- a/mobile-engage-api/build.gradle.kts +++ b/mobile-engage-api/build.gradle.kts @@ -23,10 +23,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/mobile-engage/build.gradle.kts b/mobile-engage/build.gradle.kts index c87207db..fde89e99 100644 --- a/mobile-engage/build.gradle.kts +++ b/mobile-engage/build.gradle.kts @@ -27,10 +27,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/predict-api/build.gradle.kts b/predict-api/build.gradle.kts index c0c7bc97..20a8c2a6 100644 --- a/predict-api/build.gradle.kts +++ b/predict-api/build.gradle.kts @@ -20,10 +20,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/predict/build.gradle.kts b/predict/build.gradle.kts index fa3647f9..1145c55e 100644 --- a/predict/build.gradle.kts +++ b/predict/build.gradle.kts @@ -23,10 +23,8 @@ android { multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } compileOptions { isCoreLibraryDesugaringEnabled = true diff --git a/testUtils/build.gradle.kts b/testUtils/build.gradle.kts index 2dd8eaee..95269230 100644 --- a/testUtils/build.gradle.kts +++ b/testUtils/build.gradle.kts @@ -15,10 +15,8 @@ android { targetSdk = libs.versions.android.targetSdk.get().toInt() } testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - testInstrumentationRunnerArgument( - "runnerBuilder", + testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder" - ) } buildTypes {