From 6143ec04ed7f208f6bdf0c01cfd73577c72bec51 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Tue, 28 May 2024 10:23:43 -0300 Subject: [PATCH] Upgrade Roboeletric and bump minSdk to 34 --- app/build.gradle.kts | 2 +- .../com/stevesoltys/seedvault/metadata/MetadataManagerTest.kt | 1 - .../com/stevesoltys/seedvault/plugins/saf/DocumentFileTest.kt | 1 - .../seedvault/plugins/webdav/WebDavStoragePluginTest.kt | 1 - .../stevesoltys/seedvault/restore/install/DeviceInfoTest.kt | 1 - gradle/libs.versions.toml | 4 ++-- 6 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 80387e26..a526952b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -176,7 +176,7 @@ dependencies { // anything less than 'implementation' fails tests run with gradlew testImplementation(aospLibs) testImplementation("androidx.test.ext:junit:1.1.5") - testImplementation("org.robolectric:robolectric:4.10.3") + testImplementation("org.robolectric:robolectric:4.12.2") testImplementation("org.hamcrest:hamcrest:2.2") testImplementation("org.junit.jupiter:junit-jupiter-api:${libs.versions.junit5.get()}") testImplementation("org.junit.jupiter:junit-jupiter-params:${libs.versions.junit5.get()}") diff --git a/app/src/test/java/com/stevesoltys/seedvault/metadata/MetadataManagerTest.kt b/app/src/test/java/com/stevesoltys/seedvault/metadata/MetadataManagerTest.kt index f3d0ee49..f049a827 100644 --- a/app/src/test/java/com/stevesoltys/seedvault/metadata/MetadataManagerTest.kt +++ b/app/src/test/java/com/stevesoltys/seedvault/metadata/MetadataManagerTest.kt @@ -57,7 +57,6 @@ import kotlin.random.Random @Suppress("DEPRECATION") @RunWith(AndroidJUnit4::class) @Config( - sdk = [33], // robolectric does not support 34, yet application = TestApp::class ) class MetadataManagerTest { diff --git a/app/src/test/java/com/stevesoltys/seedvault/plugins/saf/DocumentFileTest.kt b/app/src/test/java/com/stevesoltys/seedvault/plugins/saf/DocumentFileTest.kt index ce19d907..2aead4e6 100644 --- a/app/src/test/java/com/stevesoltys/seedvault/plugins/saf/DocumentFileTest.kt +++ b/app/src/test/java/com/stevesoltys/seedvault/plugins/saf/DocumentFileTest.kt @@ -24,7 +24,6 @@ import org.robolectric.annotation.Config @RunWith(AndroidJUnit4::class) @Config( - sdk = [33], // robolectric does not support 34, yet application = TestApp::class ) internal class DocumentFileTest { diff --git a/app/src/test/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePluginTest.kt b/app/src/test/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePluginTest.kt index c549ba6f..e05acf75 100644 --- a/app/src/test/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePluginTest.kt +++ b/app/src/test/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePluginTest.kt @@ -28,7 +28,6 @@ import kotlin.random.Random @RunWith(AndroidJUnit4::class) @Config( - sdk = [33], // robolectric does not support 34, yet application = TestApp::class ) internal class WebDavStoragePluginTest : TransportTest() { diff --git a/app/src/test/java/com/stevesoltys/seedvault/restore/install/DeviceInfoTest.kt b/app/src/test/java/com/stevesoltys/seedvault/restore/install/DeviceInfoTest.kt index 2f4346c3..66d36c78 100644 --- a/app/src/test/java/com/stevesoltys/seedvault/restore/install/DeviceInfoTest.kt +++ b/app/src/test/java/com/stevesoltys/seedvault/restore/install/DeviceInfoTest.kt @@ -27,7 +27,6 @@ import kotlin.random.Random @RunWith(AndroidJUnit4::class) @Config( - sdk = [33], // robolectric does not support 34, yet application = TestApp::class ) internal class DeviceInfoTest { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b170fc07..d0b7f901 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,12 +11,12 @@ ktlint = "11.5.0" # Android SDK versions compileSdk = "34" -minSdk = "33" +minSdk = "34" targetSdk = "34" # Test versions junit4 = "4.13.2" -junit5 = "5.10.0" # careful, upgrading this can change a Cipher's IV size in tests!? +junit5 = "5.10.2" # careful, upgrading this can change a Cipher's IV size in tests!? mockk = "1.13.4" # newer versions require kotlin > 1.8.10 espresso = "3.4.0"