Skip to content

fix(deps): update Robolectric to 4.17 with required JDK 17+ JVM flags - #904

Merged
LikeTheSalad merged 1 commit into
mainfrom
fix/robolectric-4.17
Sep 14, 2026
Merged

LikeTheSalad merged 1 commit into
mainfrom
fix/robolectric-4.17

Conversation

@LikeTheSalad

@LikeTheSalad LikeTheSalad commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #903

Summary

Bumps Robolectric to 4.17 and adds the JVM flags required for it to run under JDK 17+. Without the flags, Robolectric's AndroidInterceptors fails with IllegalAccessException at startup and every unit test in :agent-sdk:testDebugUnitTest crashes before executing.

Changes

  • Bump org.robolectric:robolectric from 4.16.1 to 4.17 in gradle/libs.versions.toml
  • Add --add-opens JVM flags to agent-sdk/build.gradle.kts testOptions block as required by Robolectric 4.17 on JDK 17+

Robolectric 4.17 requires --add-opens flags when running under JDK 17+
due to stronger module encapsulation. Without them AndroidInterceptors
fails with IllegalAccessException and every unit test crashes before
executing.

Supersedes #903.
@github-actions

Copy link
Copy Markdown

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@LikeTheSalad
LikeTheSalad merged commit 983313e into main Sep 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants