Skip to content

Commit 6f75ff6

Browse files
authored
Revert "Upgrade OkHttp to 5.0.0 and Kotlin to 2.2.0 and removed @ignore testcases." (#912)
2 parents 98ac9d4 + 13eb800 commit 6f75ff6

15 files changed

Lines changed: 376 additions & 409 deletions

File tree

V4_MIGRATION_GUIDE.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,14 @@ buildscript {
5050

5151
### Kotlin Version
5252

53-
v4 uses **Kotlin 2.2.0**. If you're using Kotlin in your project, you may need to update your Kotlin version to ensure compatibility.
53+
v4 uses **Kotlin 2.0.21**. If you're using Kotlin in your project, you may need to update your Kotlin version to ensure compatibility.
5454

5555
```groovy
5656
buildscript {
57-
ext.kotlin_version = "2.2.0"
57+
ext.kotlin_version = "2.0.21"
5858
}
5959
```
6060

61-
> **Note:** Kotlin 2.2.0 promotes the deprecation of `String.toLowerCase()` / `String.toUpperCase()` without a `Locale` parameter to an error. If your project uses these methods, replace them with `lowercase(Locale.ROOT)` / `uppercase(Locale.ROOT)`.
62-
6361
## Breaking Changes
6462

6563
### Classes Removed
@@ -98,17 +96,6 @@ implementation 'com.google.code.gson:gson:2.8.9' // your preferred version
9896

9997
> **Note:** Pinning or excluding is not recommended long-term, as the SDK has been tested and validated against Gson 2.11.0.
10098
101-
### OkHttp 4.12.0 → 5.0.0 (Internal Dependency)
102-
103-
v4 upgrades the internal OkHttp dependency from **4.12.0** to **5.0.0**. OkHttp is used as an `implementation` dependency and is **not** exposed in the SDK's public API, so this change should be transparent to most applications.
104-
105-
However, if your app provides a custom `NetworkingClient` implementation that interacts with OkHttp types, or if you depend on OkHttp transitively through the SDK, be aware of the following:
106-
107-
- **OkHttp 5.0.0 requires Kotlin 2.2.0+** at compile time. This is already satisfied by the SDK's Kotlin version requirement.
108-
- **Okio 3.x is now required.** OkHttp 5.0.0 depends on Okio 3.x (previously Okio 2.x). If your app uses Okio directly, you may need to update your Okio dependency.
109-
110-
> **Note:** Since OkHttp is an internal dependency of the SDK, no changes are required in your application code unless you are directly depending on OkHttp types from this SDK's classpath.
111-
11299
## Getting Help
113100

114101
If you encounter issues during migration:

auth0/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ android {
8080
}
8181

8282
ext {
83-
okhttpVersion = '5.0.0'
83+
okhttpVersion = '4.12.0'
8484
coroutinesVersion = '1.10.2'
8585
biometricLibraryVersion = '1.1.0'
8686
}
@@ -104,7 +104,7 @@ dependencies {
104104
testImplementation 'org.hamcrest:java-hamcrest:2.0.0.0'
105105
testImplementation 'org.mockito:mockito-core:5.14.0'
106106
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.4.0'
107-
testImplementation "com.squareup.okhttp3:mockwebserver3:$okhttpVersion"
107+
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttpVersion"
108108
testImplementation "com.squareup.okhttp3:okhttp-tls:$okhttpVersion"
109109
testImplementation 'com.jayway.awaitility:awaitility:1.7.0'
110110
testImplementation 'org.robolectric:robolectric:4.15.1'

auth0/src/main/java/com/auth0/android/provider/WebAuthProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public object WebAuthProvider : SenderConstraining<WebAuthProvider> {
176176
* @return the current builder instance
177177
*/
178178
public fun withScheme(scheme: String): LogoutBuilder {
179-
val lowerCase = scheme.lowercase(Locale.ROOT)
179+
val lowerCase = scheme.toLowerCase(Locale.ROOT)
180180
if (scheme != lowerCase) {
181181
Log.w(
182182
TAG,
@@ -397,7 +397,7 @@ public object WebAuthProvider : SenderConstraining<WebAuthProvider> {
397397
* @return the current builder instance
398398
*/
399399
public fun withScheme(scheme: String): Builder {
400-
val lowerCase = scheme.lowercase(Locale.ROOT)
400+
val lowerCase = scheme.toLowerCase(Locale.ROOT)
401401
if (scheme != lowerCase) {
402402
Log.w(
403403
TAG,

auth0/src/main/java/com/auth0/android/request/internal/OidcUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ internal object OidcUtils {
1919
*/
2020
fun includeRequiredScope(scope: String): String {
2121
val existingScopes = scope.split(" ")
22-
.map { it.lowercase(Locale.ROOT) }
22+
.map { it.toLowerCase(Locale.ROOT) }
2323
return if (!existingScopes.contains(REQUIRED_SCOPE)) {
2424
(existingScopes + REQUIRED_SCOPE).joinToString(separator = " ").trim()
2525
} else {

0 commit comments

Comments
 (0)