Skip to content

Conversation

@utzcoz
Copy link

@utzcoz utzcoz commented Nov 19, 2025

  1. See https://github.com/robolectric/robolectric/releases/tag/robolectric-4.16 for 4.16 release.
  2. The minimum supported SDK version is 23 of this Robolectric version. So there are some changes for mimumSdk configuration and tests.

Summary by CodeRabbit

  • Chores
    • Increased minimum Android SDK requirement from API 19 to API 21.
    • Updated robolectric testing library to version 4.16.

The minimum supported SDK of this version is 23.

Signed-off-by: utzcoz <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 19, 2025

Walkthrough

Updated dependency versions in gradle version catalog: androidMinimumSdk bumped from 19 to 21 and robolectric upgraded from 4.14.1 to 4.16. Test assertions updated to reflect the new Android M SDK level instead of LOLLIPOP.

Changes

Cohort / File(s) Summary
Gradle version catalog
gradle/libs.versions.toml
Updated version entries: androidMinimumSdk from "19" to "21"; robolectric from "4.14.1" to "4.16"
Robolectric test configuration
robolectric-extension/src/test/kotlin/tech/apter/junit/jupiter/robolectric/RobolectricExtensionCustomAndroidSdkSelfTest.kt
Updated @Config annotation from Build.VERSION_CODES.LOLLIPOP to Build.VERSION_CODES.M; updated corresponding assertions to expect SDK level M with release "6.0.1" instead of LOLLIPOP with "5.0.2"; changes applied across outer and nested test methods

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward dependency version bumps with consistent pattern of updates across test assertions
  • All changes are aligned and follow the same reasoning (SDK level transition)

Suggested labels

dependencies, gradle

Suggested reviewers

  • warnyul

Poem

🐰 With gradle tuned and sdk raised high,
From Lollipop to M, we touch the sky,
Robolectric hops along with glee,
Version dance complete, let tests run free! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change: upgrading the Robolectric dependency to version 4.16.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@utzcoz
Copy link
Author

utzcoz commented Nov 19, 2025

Hi @warnyul, PTAL.

@utzcoz
Copy link
Author

utzcoz commented Nov 19, 2025

I also reading some files of this project, and looks like they are made as the downstream extension of junit runner and sandbox.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
gradle/libs.versions.toml (1)

7-7: Confirm intended androidMinimumSdk in light of Robolectric 4.16’s min API 23

Robolectric 4.16 now only supports running tests from Android M (API 23) upwards and drops 21/22. Bumping robolectric = "4.16" here is correct, but androidMinimumSdk was only raised to "21", while the PR description mentions a minimum supported SDK of 23.

If your goal is for this project’s documented minimum Android SDK to align with Robolectric’s minimum, consider bumping to 23; if you deliberately want to keep the library usable on 21/22 while tests run against 23, then the current value is fine but should be a conscious choice.

Possible change if you decide to align them:

-androidMinimumSdk = "21"
+androidMinimumSdk = "23"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0415a21 and 3543eb3.

📒 Files selected for processing (2)
  • gradle/libs.versions.toml (2 hunks)
  • robolectric-extension/src/test/kotlin/tech/apter/junit/jupiter/robolectric/RobolectricExtensionCustomAndroidSdkSelfTest.kt (2 hunks)
🔇 Additional comments (1)
robolectric-extension/src/test/kotlin/tech/apter/junit/jupiter/robolectric/RobolectricExtensionCustomAndroidSdkSelfTest.kt (1)

15-43: Tests correctly updated to target SDK 23 (Android M)

Using @Config(sdk = [Build.VERSION_CODES.M]) and asserting SDK_INT plus RELEASE == "6.0.1" in the outer and nested tests matches Robolectric 4.16’s new supported range (M and above) while preserving the original intent of verifying shared SDK and class loader across nested classes. Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant