From 3b96d840c59def2823844a7c93112194736e1abf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 14:10:17 +0000 Subject: [PATCH 1/2] Update dependency org.robolectric:robolectric to v4.17 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index beea9ddef2..b45cd79083 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -172,7 +172,7 @@ test_konsist = "com.github.jmartinesp:konsist:0.18.0" test_turbine = "app.cash.turbine:turbine:1.2.1" test_truth = "com.google.truth:truth:1.4.5" test_parameter_injector = "com.google.testparameterinjector:test-parameter-injector:1.23" -test_robolectric = "org.robolectric:robolectric:4.16.1" +test_robolectric = "org.robolectric:robolectric:4.17" test_appyx_junit = { module = "com.bumble.appyx:testing-junit4", version.ref = "appyx" } test_composable_preview_scanner = "io.github.sergio-sastre.ComposablePreviewScanner:android:0.9.3" test_detekt_api = { module = "io.gitlab.arturbosch.detekt:detekt-api", version.ref = "detekt" } From bfdfa836d98d9e6425d0c061603380640f01d7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 2 Oct 2026 08:02:41 +0200 Subject: [PATCH 2/2] Fix Robolectric 4.17 issues --- build.gradle.kts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index e7a03b403d..43c82def41 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -149,7 +149,13 @@ sonar { allprojects { tasks.withType { - maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1) + // Robolectric 4.17 sets up shared memory during application setup, which goes through its + // FileDescriptor interceptor. That interceptor reaches into `java.io.FileDescriptor` and + // `jdk.internal.access.SharedSecrets`, both of which are encapsulated since JDK 17. + jvmArgs( + "--add-opens=java.base/java.io=ALL-UNNAMED", + "--add-exports=java.base/jdk.internal.access=ALL-UNNAMED", + ) val isScreenshotTest = project.gradle.startParameter.taskNames.any { it.contains("paparazzi", ignoreCase = true) } if (isScreenshotTest) { @@ -173,6 +179,9 @@ allprojects { // Gradle parallelise by running many modules' test tasks concurrently instead. maxParallelForks = 1 + // Increase heap size for screenshot tests + maxHeapSize = "2g" + // Disable screenshot tests by default exclude("ui/*.class") exclude("translations/*.class")