android-interop-testing: add AndroidX Test core and rules to androidTestImplementation#12718
android-interop-testing: add AndroidX Test core and rules to androidTestImplementation#12718shivaspeaks wants to merge 4 commits intogrpc:masterfrom
Conversation
|
Please test this by running the tests using grpc-java/buildscripts/kokoro/android-interop.sh Lines 31 to 43 in 91e9491 |
Are you sure? You're telling me that implementation is not part of androidTestImplementation deps? That seems unlikely. What seems more likely is there's a version skew problem. |
|
|
||
| androidTestImplementation libraries.androidx.test.ext.junit, | ||
| libraries.androidx.test.runner | ||
| libraries.androidx.test.rules, |
There was a problem hiding this comment.
It looks like this does nothing, because there is no comma on the previous line.
There was a problem hiding this comment.
I actually tested with comma. That was a mistake in the PR. I added commit.
There was a problem hiding this comment.
But did you test without these lines? It worked fine for me by only adding to implementation.
https://console.firebase.google.com/project/grpc-testing/testlab/histories/bh.6e2cfdde264f9eb3/matrices/8595119025233516396
There was a problem hiding this comment.
Aaah, I thought core was coming in transitively anyway with rules. Yeah you're right.
This change explicitly adds 'libraries.androidx.test.rules' and 'libraries.androidx.test.core' to the 'androidTestImplementation' configuration.
This alignment follows the pattern used in the 'binder' module to ensure that these testing components are correctly packaged in the Test APK. Previously, these dependencies were only declared in the 'implementation' block (Main APK), which triggered a "classpath split" issue. In that state, the test process was unable to resolve internal orchestration classes, leading to NoClassDefFoundError crashes.
Fixes #12703 (comment)