Ensure Robolectric test are run using API 36 until the library support API 37.

This commit is contained in:
Benoit Marty
2026-06-18 11:30:14 +02:00
committed by Benoit Marty
parent 51c3ee0eae
commit c430877d87
173 changed files with 401 additions and 698 deletions
+1
View File
@@ -20,6 +20,7 @@ android {
dependencies {
implementation(libs.test.junit)
implementation(libs.test.truth)
implementation(libs.test.robolectric)
implementation(libs.coroutines.test)
implementation(projects.libraries.androidutils)
implementation(projects.libraries.architecture)
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.tests.testutils.robolectric
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
/**
* Base class for all Robolectric tests.
*
* It is now configured to run by default on Android API 36,
* waiting for Robolectric to support API 37.
*/
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [36])
open class RobolectricTest
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.tests.testutils.robolectric
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestParameterInjector
import org.robolectric.annotation.Config
/**
* Base class for all Robolectric tests with parameter injector.
*
* It is now configured to run by default on Android API 36,
* waiting for Robolectric to support API 37.
*/
@RunWith(RobolectricTestParameterInjector::class)
@Config(sdk = [36])
open class RobolectricTestParameter