Skip to content

Run CI on JDK 21 for Robolectric SDK 36 tests#1

Draft
Jacobcdsmith with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-failing-github-actions-job
Draft

Run CI on JDK 21 for Robolectric SDK 36 tests#1
Jacobcdsmith with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown

The build GitHub Actions job was failing in :app:testDebugUnitTest because the workflow ran Robolectric tests targeting SDK 36 on JDK 17. Robolectric 4.16 supports SDK 36, but requires JDK 21 for that test path.

  • Root cause

    • CI provisioned temurin Java 17
    • Robolectric tests explicitly target SDK 36:
      • ExampleRobolectricTest
      • GreetingScreenshotTest
    • This mismatch caused the failing build job
  • Change

    • Updated .github/workflows/ci.yml to use JDK 21 in the build job
    • No app, Gradle, or test logic changes
  • Workflow update

    - name: Set up JDK 21
      uses: actions/setup-java@v4
      with:
        distribution: 'temurin'
        java-version: '21'
  • Why this is scoped correctly

    • The failure was caused by CI runtime configuration, not production code
    • Aligning the workflow JDK with the SDK 36 Robolectric requirement resolves the failing path without broadening repository changes

Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'build' Run CI on JDK 21 for Robolectric SDK 36 tests Jul 5, 2026
Copilot AI requested a review from Jacobcdsmith July 5, 2026 04:12
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.

2 participants