Skip to content

Revert "Upgrade OkHttp to 5.0.0 and Kotlin to 2.2.0 and removed @ignore testcases."#912

Merged
utkrishtsahu merged 1 commit intov4_developmentfrom
revert-911-upgrade-okhttp-5x
Feb 16, 2026
Merged

Revert "Upgrade OkHttp to 5.0.0 and Kotlin to 2.2.0 and removed @ignore testcases."#912
utkrishtsahu merged 1 commit intov4_developmentfrom
revert-911-upgrade-okhttp-5x

Conversation

@pmathew92
Copy link
Contributor

Reverts #911

Copilot AI review requested due to automatic review settings February 16, 2026 06:17
@pmathew92 pmathew92 requested a review from a team as a code owner February 16, 2026 06:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 mockwebserver3 usages with OkHttp 4 okhttp3.mockwebserver APIs 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")
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

Spelling: "Roboelectric" should be "Robolectric" in the @ignore reason string.

Suggested change
@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")

Copilot uses AI. Check for mistakes.
fun includeRequiredScope(scope: String): String {
val existingScopes = scope.split(" ")
.map { it.lowercase(Locale.ROOT) }
.map { it.toLowerCase(Locale.ROOT) }
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

String.toLowerCase(Locale) is deprecated in Kotlin; prefer lowercase(Locale.ROOT) to avoid deprecation warnings and future compatibility issues.

Suggested change
.map { it.toLowerCase(Locale.ROOT) }
.map { it.lowercase(Locale.ROOT) }

Copilot uses AI. Check for mistakes.
*/
public fun withScheme(scheme: String): LogoutBuilder {
val lowerCase = scheme.lowercase(Locale.ROOT)
val lowerCase = scheme.toLowerCase(Locale.ROOT)
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

String.toLowerCase(Locale) is deprecated in Kotlin; prefer lowercase(Locale.ROOT) to avoid deprecation warnings and future compatibility issues.

Suggested change
val lowerCase = scheme.toLowerCase(Locale.ROOT)
val lowerCase = scheme.lowercase(Locale.ROOT)

Copilot uses AI. Check for mistakes.
*/
public fun withScheme(scheme: String): Builder {
val lowerCase = scheme.lowercase(Locale.ROOT)
val lowerCase = scheme.toLowerCase(Locale.ROOT)
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

String.toLowerCase(Locale) is deprecated in Kotlin; prefer lowercase(Locale.ROOT) to avoid deprecation warnings and future compatibility issues.

Suggested change
val lowerCase = scheme.toLowerCase(Locale.ROOT)
val lowerCase = scheme.lowercase(Locale.ROOT)

Copilot uses AI. Check for mistakes.
@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")
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

Spelling: "Roboelectric" should be "Robolectric" in the @ignore reason string.

Suggested change
@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")

Copilot uses AI. Check for mistakes.
@utkrishtsahu utkrishtsahu merged commit 6f75ff6 into v4_development Feb 16, 2026
12 checks passed
@utkrishtsahu utkrishtsahu deleted the revert-911-upgrade-okhttp-5x branch February 16, 2026 06:30
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

Comments