Fix androidTest junit classpath - #211
Merged
Merged
Conversation
There was a problem hiding this comment.
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:junitcoming fromandroid-davto prevent it from influencing the production/runtime classpath resolution. - Add an explicit
androidTestImplementationdependency on JUnit 4 (4.13.2via version catalog) to ensure theandroidTestcompile 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
force-pushed
the
fix/androidtest-junit-classpat
branch
from
August 12, 2026 13:38
1508763 to
ebdbf32
Compare
guruz
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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"