Revert "Upgrade OkHttp to 5.0.0 and Kotlin to 2.2.0 and removed @ignore testcases."#912
Conversation
There was a problem hiding this comment.
Pull request overview
Reverts the prior dependency upgrade PR by downgrading Kotlin/OkHttp and aligning production/test code and docs back to OkHttp 4.x + MockWebServer 4.x APIs.
Changes:
- Downgrade Kotlin Gradle plugin version to 2.0.21 and OkHttp to 4.12.0.
- Replace OkHttp 5
mockwebserver3usages with OkHttp 4okhttp3.mockwebserverAPIs across the test suite. - Update docs (V4 migration guide) to reflect the reverted Kotlin/OkHttp versions and remove now-irrelevant upgrade notes.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| build.gradle | Reverts kotlin_version to 2.0.21. |
| auth0/build.gradle | Reverts OkHttp to 4.12.0 and switches test dependency to mockwebserver. |
| auth0/src/test/java/com/auth0/android/util/SSLTestUtils.kt | Updates MockWebServer import and useHttps signature for OkHttp 4. |
| auth0/src/test/java/com/auth0/android/util/AuthenticationAPIMockServer.kt | Reverts MockResponse construction to OkHttp 4-style setters. |
| auth0/src/test/java/com/auth0/android/util/APIMockServer.kt | Reverts MockWebServer/MockResponse usage and uses shutdown(). |
| auth0/src/test/java/com/auth0/android/request/internal/ThreadSwitcherShadow.java | Adjusts shadow behavior by removing the mainThread implementation. |
| auth0/src/test/java/com/auth0/android/request/DefaultClientTest.kt | Reverts MockWebServer APIs (path, shutdown, response setters, body reading). |
| auth0/src/test/java/com/auth0/android/provider/WebAuthProviderTest.kt | Reintroduces ignored tests + switches JWKS mocking to MockWebServer; removes ConscryptMode usage. |
| auth0/src/test/java/com/auth0/android/myaccount/MyAccountAPIClientTest.kt | Reverts RecordedRequest API usage (path, getHeader, readUtf8). |
| auth0/src/test/java/com/auth0/android/management/UsersAPIClientTest.kt | Reverts RecordedRequest API usage (path, getHeader, readUtf8). |
| auth0/src/test/java/com/auth0/android/authentication/MfaApiClientTest.kt | Reverts MockWebServer/MockResponse usage and request assertions (path, getHeader). |
| auth0/src/test/java/com/auth0/android/authentication/AuthenticationAPIClientTest.kt | Reverts RecordedRequest assertions (path, getHeader, readUtf8). |
| auth0/src/main/java/com/auth0/android/request/internal/OidcUtils.kt | Switches scope normalization back to toLowerCase(Locale.ROOT). |
| auth0/src/main/java/com/auth0/android/provider/WebAuthProvider.kt | Switches scheme normalization back to toLowerCase(Locale.ROOT). |
| V4_MIGRATION_GUIDE.md | Updates Kotlin version guidance and removes OkHttp 5 upgrade notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @ConscryptMode(ConscryptMode.Mode.OFF) | ||
| //TODO: https://auth0team.atlassian.net/browse/SDK-7752 | ||
| @Test | ||
| @Ignore("Fix these failing tests in CI once Roboelectric and other dependencies are updated") |
There was a problem hiding this comment.
Spelling: "Roboelectric" should be "Robolectric" in the @ignore reason string.
| @Ignore("Fix these failing tests in CI once Roboelectric and other dependencies are updated") | |
| @Ignore("Fix these failing tests in CI once Robolectric and other dependencies are updated") |
| fun includeRequiredScope(scope: String): String { | ||
| val existingScopes = scope.split(" ") | ||
| .map { it.lowercase(Locale.ROOT) } | ||
| .map { it.toLowerCase(Locale.ROOT) } |
There was a problem hiding this comment.
String.toLowerCase(Locale) is deprecated in Kotlin; prefer lowercase(Locale.ROOT) to avoid deprecation warnings and future compatibility issues.
| .map { it.toLowerCase(Locale.ROOT) } | |
| .map { it.lowercase(Locale.ROOT) } |
| */ | ||
| public fun withScheme(scheme: String): LogoutBuilder { | ||
| val lowerCase = scheme.lowercase(Locale.ROOT) | ||
| val lowerCase = scheme.toLowerCase(Locale.ROOT) |
There was a problem hiding this comment.
String.toLowerCase(Locale) is deprecated in Kotlin; prefer lowercase(Locale.ROOT) to avoid deprecation warnings and future compatibility issues.
| val lowerCase = scheme.toLowerCase(Locale.ROOT) | |
| val lowerCase = scheme.lowercase(Locale.ROOT) |
| */ | ||
| public fun withScheme(scheme: String): Builder { | ||
| val lowerCase = scheme.lowercase(Locale.ROOT) | ||
| val lowerCase = scheme.toLowerCase(Locale.ROOT) |
There was a problem hiding this comment.
String.toLowerCase(Locale) is deprecated in Kotlin; prefer lowercase(Locale.ROOT) to avoid deprecation warnings and future compatibility issues.
| val lowerCase = scheme.toLowerCase(Locale.ROOT) | |
| val lowerCase = scheme.lowercase(Locale.ROOT) |
| @ConscryptMode(ConscryptMode.Mode.OFF) | ||
| // TODO: https://auth0team.atlassian.net/browse/SDK-7752 | ||
| @Test | ||
| @Ignore("Fix these failing tests in CI once Roboelectric and other dependencies are updated") |
There was a problem hiding this comment.
Spelling: "Roboelectric" should be "Robolectric" in the @ignore reason string.
| @Ignore("Fix these failing tests in CI once Roboelectric and other dependencies are updated") | |
| @Ignore("Fix these failing tests in CI once Robolectric and other dependencies are updated") |
Reverts #911