Merge pull request #3328 from CatimaLoyalty/deps/robolectric

Update Robolectric
This commit is contained in:
Sylvia van Os authored and GitHub committed 2026-09-18 20:00:42 +02:00
commit f888fc0bae
2 files changed
+23 -4

No files matched your search

+22 -3
View File
@@ -89,15 +89,34 @@ android {
}
}
// Starting with Android Studio 3 Robolectric is unable to find resources.
// The following allows it to find the resources.
testOptions.unitTests.isIncludeAndroidResources = true
tasks.withType<Test>().configureEach {
testLogging {
events("started", "passed", "skipped", "failed")
}
}
testOptions {
unitTests {
// Starting with Android Studio 3 Robolectric is unable to find resources.
// The following allows it to find the resources.
isIncludeAndroidResources = true
all {
// Needed on Java 17 and up
it.jvmArgs(
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-opens=java.base/java.net=ALL-UNNAMED",
"--add-opens=java.base/java.security=ALL-UNNAMED",
"--add-opens=java.base/java.text=ALL-UNNAMED",
"--add-opens=java.base/jdk.internal.access=ALL-UNNAMED",
"--add-opens=java.desktop/java.awt.font=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
)
}
}
}
lint {
lintConfig = file("lint.xml")
}
+1 -1
View File
@@ -59,7 +59,7 @@ androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version
androidx-test-uiautomator-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version = "2.4.0" }
androidx-test-espresso-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version = "3.7.0" }
junit-junit = { group = "junit", name = "junit", version = "4.13.2" }
org-robolectric-robolectric = { group = "org.robolectric", name = "robolectric", version = "4.16.1" }
org-robolectric-robolectric = { group = "org.robolectric", name = "robolectric", version = "4.17" }
[plugins]
com-android-application = { id = "com.android.application", version = "9.4.0" }