Skip to content

Fix androidTest junit classpath - #211

Merged
v-scharf merged 1 commit into
mainfrom
fix/androidtest-junit-classpat
Aug 14, 2026
Merged

Fix androidTest junit classpath#211
v-scharf merged 1 commit into
mainfrom
fix/androidtest-junit-classpat

Conversation

@v-scharf

Copy link
Copy Markdown
Contributor

https://ci.opencloud.rocks/repos/30/pipeline/41/3
compileOriginalDebugAndroidTestKotlin failed with "Cannot access 'org.junit.rules.TestRule' which is a supertype of GrantPermissionRule" because junit4 was not on the androidTest compile classpath, and AGP consistent resolution pinned the androidTest classpath to "strictly 4.7"

Copilot AI lite review requested due to automatic review settings August 12, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an instrumented-test compilation failure caused by an unintended junit:junit:4.7 version being pulled into the dependency graph and (via AGP consistent resolution) constraining the androidTest classpath, leading to missing org.junit.rules.TestRule for AndroidX test rules.

Changes:

  • Exclude the stray transitive junit:junit coming from android-dav to prevent it from influencing the production/runtime classpath resolution.
  • Add an explicit androidTestImplementation dependency on JUnit 4 (4.13.2 via version catalog) to ensure the androidTest compile classpath has the required JUnit APIs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
opencloudComLibrary/build.gradle Excludes transitive junit:junit from the android-dav API dependency to avoid pinning androidTest resolution to JUnit 4.7.
opencloudApp/build.gradle Adds androidTestImplementation libs.junit4 so instrumented tests compile against the expected JUnit 4 APIs.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@v-scharf
v-scharf force-pushed the fix/androidtest-junit-classpat branch from 1508763 to ebdbf32 Compare August 12, 2026 13:38
@v-scharf
v-scharf requested a review from guruz August 13, 2026 07:34
@v-scharf
v-scharf merged commit 2ed9143 into main Aug 14, 2026
4 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.

3 participants